コード例 #1
0
        public HttpResponseMessage <Earthwatcher> Get(string name)
        {
            Earthwatcher earthwatcher = earthwatcherRepository.Get(name);

            if (earthwatcher == null)
            {
                return(new HttpResponseMessage <Earthwatcher>(HttpStatusCode.NotFound));
            }
            return(new HttpResponseMessage <Earthwatcher>(earthwatcher)
            {
                StatusCode = HttpStatusCode.OK
            });
        }