示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }