Exemple #1
0
        public HttpResponseMessage <Land> Get(int id, HttpRequestMessage request)
        {
            try
            {
                var land = landRepository.GetLand(id);
                if (land == null)
                {
                    return(new HttpResponseMessage <Land>(HttpStatusCode.NotFound));
                }

                //LandLinks.AddLinks(land, request);

                return(new HttpResponseMessage <Land>(land)
                {
                    StatusCode = HttpStatusCode.OK
                });
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }