/// <inheritdoc/> public Task <Result> RespondAsync(IUserUpdate gatewayEvent, CancellationToken ct = default) { var key = KeyHelpers.CreateUserCacheKey(gatewayEvent.ID); _cacheService.Cache <IUser>(key, gatewayEvent); return(Task.FromResult(Result.FromSuccess())); }
public UserController(IUserFind <UserFindDto> userFind, IUserCreate <UserDto> userCreate, IUserDelete <UserDto> userDelete, IUserUpdate <UserDto> userUpdate) { _userFind = userFind; _userCreate = userCreate; _userDelete = userDelete; _userUpdate = userUpdate; }
public IActionResult Put(int id, [FromBody] UserUpdateDto dto, [FromServices] IUserUpdate command) { dto.Id = id; _executor.ExecuteCommand(command, dto); return(StatusCode(StatusCodes.Status204NoContent)); }
/// <summary> /// Initialise a new instance of <see cref="UserUpdateQuery"/>. /// </summary> /// <param name="userUpdate">User update</param> /// <param name="currentUser">Current user.</param> public UserUpdateQuery(IUserUpdate userUpdate, MeUser currentUser) { CurrentUser = currentUser; UserUpdate = userUpdate; }