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 void Delete(string id, string commandId, string version, string requesterId = default(string)) { try { var value = new DeleteUserDto(); value.CommandId = commandId; value.RequesterId = requesterId; value.Version = (long)Convert.ChangeType(version, typeof(long)); UsersControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _userApplicationService.When(value as IDeleteUser); } catch (Exception ex) { var response = UsersControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }