Пример #1
0
        // POST api/user
        public long Post([FromBody] User Usr)
        {
            ServiceResponse <User> Response = _userRepository.Save(Usr);

            if (Response.Error)
            {
                throw new HttpResponseException(this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, Response.Message));
            }
            return(Convert.ToInt64(Response.ObjectResult));
        }