Ejemplo n.º 1
0
        /// <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()));
        }
Ejemplo n.º 2
0
 public UserController(IUserFind <UserFindDto> userFind, IUserCreate <UserDto> userCreate, IUserDelete <UserDto> userDelete,
                       IUserUpdate <UserDto> userUpdate)
 {
     _userFind   = userFind;
     _userCreate = userCreate;
     _userDelete = userDelete;
     _userUpdate = userUpdate;
 }
Ejemplo n.º 3
0
        public IActionResult Put(int id,
                                 [FromBody] UserUpdateDto dto,
                                 [FromServices] IUserUpdate command)
        {
            dto.Id = id;

            _executor.ExecuteCommand(command, dto);

            return(StatusCode(StatusCodes.Status204NoContent));
        }
Ejemplo n.º 4
0
 /// <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;
 }