Пример #1
0
        public HttpResponseMessage InsertToDoTask(ToDoRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            int returnedId = ToDoServices.InsertToDoTask(model);

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