Esempio n. 1
0
        public HttpResponseMessage <SatelliteImage> Post(SatelliteImage satelliteImage, HttpRequestMessage <SatelliteImage> request)
        {
            if (satelliteImage != null)
            {
                var satelliteImageDb = satelliteImageRepository.Insert(satelliteImage);

                var response = new HttpResponseMessage <SatelliteImage>(satelliteImageDb)
                {
                    StatusCode = HttpStatusCode.Created
                };
                return(response);
            }
            return(new HttpResponseMessage <SatelliteImage>(null)
            {
                StatusCode = HttpStatusCode.NotFound,
            });
        }