Beispiel #1
0
        public HttpResponseMessage ContributeMap(MapRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }
            int num = MapService.ContributeMap(model);

            var response = new ItemResponse <int> {
                Item = num
            };

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }