public async Task SignUpAsync(Guid id, string email, string password, string role) { var user = await _userFactory.CreateAsync(id, email, password, role); await _userRepository.CreateAsync(user); await _eventDispatcher.DispatchAsync(user.Events.ToArray()); }
public async System.Threading.Tasks.Task RegisterAsync(RegisterUserDto registerUserDto) { var newAccount = await _accountFactory.CreateAsync(registerUserDto.Login, registerUserDto.Password); var newUser = await _userFactory.CreateAsync(registerUserDto.Login, registerUserDto.Password, registerUserDto.UserType, newAccount); await _userRepository.AddAsync(newUser); await _accountRepository.AddAsync(newAccount); }
public async Task SignUpAsync(Guid userId, string email, string password) { var newUser = await _userFactory.CreateAsync(userId, email, password); await _userRepository.AddAsync(newUser); }