public IHttpActionResult GetSite(int i_SiteID) { using (EntitiesNegev4 context = new EntitiesNegev4()) { IHttpActionResult response = StatusCode(System.Net.HttpStatusCode.ServiceUnavailable); ILightWeight siteToSend = m_SiteHendler.GetRowByID(i_SiteID, context); if (siteToSend != null) { response = Ok(siteToSend); } return(response); } }
public IHttpActionResult GetCropByID(int id) { using (EntitiesNegev4 context = new EntitiesNegev4()) { IHttpActionResult response = StatusCode(System.Net.HttpStatusCode.ServiceUnavailable); ILightWeight cropToSend = m_CropHendler.GetRowByID(id, context); if (cropToSend != null) { response = Ok(cropToSend); } return(response); } }