public void Patch(string id, [FromBody] MergePatchUserDto value) { try { UsersControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _userApplicationService.When(value as IMergePatchUser); } catch (Exception ex) { var response = UsersControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchUserDto c) { var idObj = (c as IMergePatchUser).UserId; var uriParameters = new UserUriParameters(); uriParameters.Id = idObj; var req = new UserPatchRequest(uriParameters, (MergePatchUserDto)c); var resp = await _ramlClient.User.Patch(req); UserProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchUserDto c) { WhenAsync(c).GetAwaiter().GetResult(); }