public ReadUserUseCase(IUserRepository userRepository, IAuthService authService) { _userRepository = userRepository; // Inject authservice here to get the current logged in user, so that // their id could be accessed. // The Id is used in the query to exclude f _currentUser = authService.GetCurrentUser(); }
public static User MapFrom(Core.Domain.Entities.User user) { return(new User { Id = user.Id.Value(), Name = user.Name, Surname = user.Surname, Email = user.Email.Value(), Password = user.Password.Value(), Country = user.Country, Phone = user.Phone?.Value(), PostalCode = user.PostalCode?.Value() }); }
public UserDto(Core.Domain.Entities.User user) { this.FirstName = user.FirstName; this.Id = user.Id; this.LastName = user.LastName; }