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))); }
public IHttpContentResult <UserDocument> Put(int userId, UserDocument document) { return(Request.CreateContentResponse(resource.Update(userId, document))); }