Beispiel #1
0
        public async Task <UserResponse> GetUserAsync(GetUserRequest request, CancellationToken cancellationToken = default)
        {
            User response = await _userRespository.GetByEmailAsync(request.Email, cancellationToken);

            return((response != null) ?
                   new UserResponse
            {
                LastName = response.LastName,
                FirstName = response.FirstName,
                Email = response.Email
            } : throw new StackException("user not found"));
        }