I am looking to resolve a stored procedure issue. I am trying to return the results for the following method:
[WebMethod]public ReturnICAOInformation GetICAO(string ICAO, string Country, string City, string LAT, string LONG)
{
ReturnICAOInformation returnParam = new ReturnICAOInformation();
using (MASInventoryDbDataContext db = new MASInventoryDbDataContext())
{
usp_ValidateICAORresult result = db.usp_ValidateICAO(ICAO, Country, City, LAT, LONG).SingleOrDefault();
if (result != null)
{
returnParam.ICAO = result.ICAO;
returnParam.Country = result.Counrty;
returnParam.City = result.City;
returnParam.LAT = result.LAT;
returnParam.LONG = result.LONG;
returnParam.ReturnCode = result.ReturnCode;
}
else
{
returnParam.ReturnCode = "failed";
}
}
return returnParam;
}
}
}
Any help would be very grateful.
Thanks,
Matt
M Novak