示例#1
0
 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); }
 }
示例#2
0
        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);
        }
示例#3
0
 public void When(MergePatchUserDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }