public async Task <UserIdentifierUpdateRequest> UpdateIdentifierAsync(UserIdentifierUpdateRequest request) { _validationStrategyContext.SetStrategy(new UserProfileUpdateValidationStratergy()); bool canUpdate = _validationStrategyContext.Validate(request); if (!canUpdate) { foreach (var item in _validationStrategyContext.Errors) { throw new ArgumentNullException(item.Message); } } await _userRepository.Get(x => x.Id == request.Id) .Set(x => x.UpdatedById, request.Id) .Set(x => x.UpdatedDate, DateTimeOffset.UtcNow) .Set(x => x.Lastname, request.Lastname) .Set(x => x.Firstname, request.Firstname) .Set(x => x.DisplayName, request.DisplayName) .UpdateAsync(); return(request); }
public async Task <UserIdentifierUpdateRequest> UpdateIdentifierAsync(UserIdentifierUpdateRequest request) { return(await _userRepository.UpdateIdentifierAsync(request)); }