public static User From(UserNew userNew) { return(new User() { Profile = userNew.Profile, Account = new UserAccount() { Credentials = new Credentials() { Email = userNew.Email, PasswordHash = userNew.PasswordHash } } }); }
public async Task RegisterAsync(UserNew newUser) { var user = User.From(newUser); await _userRepository.AddAsync(user); }