Beispiel #1
0
        public HttpResponseMessage Add(SquadAddRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState));
            }

            ItemResponse <int> response = new ItemResponse <int>();

            response.Item = _squadService.Insert(model);

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