示例#1
0
        public IActionResult Update(Guid id, [FromBody] User user)
        {
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            if (!_userResource.Exists(id))
            {
                return(NotFound());
            }

            return(Ok(_userResource.Update(id, user)));
        }
示例#2
0
 public IHttpContentResult <UserDocument> Put(int userId, UserDocument document)
 {
     return(Request.CreateContentResponse(resource.Update(userId, document)));
 }