Exemple #1
0
        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());
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        public async Task SignUpAsync(Guid userId, string email, string password)
        {
            var newUser = await _userFactory.CreateAsync(userId, email, password);

            await _userRepository.AddAsync(newUser);
        }