예제 #1
0
        public async Task <IClientAccount> RegisterClientAsync(string email, string firstname, string lastname, string phone, string password)
        {
            IClientAccount clientAccount = ClientAccount.Create(email, phone);

            clientAccount = await _tradersRepository.RegisterAsync(clientAccount, password);

            await _srvSmsConfirmator.SendSmsAsync(clientAccount.Id);

            await _personalDataRepository.SaveAsync(PersonalData.Create(clientAccount, firstname, lastname));

            await RegisterAccountAsync(clientAccount, "EUR");
            await RegisterAccountAsync(clientAccount, "USD");
            await RegisterAccountAsync(clientAccount, "CHF");

            return(clientAccount);
        }
예제 #2
0
        public async Task <Director> CreateAsync(string firstName, string lastName)
        {
            var director = await Task.FromResult(Director.Create(PersonalData.Create(firstName, lastName)));

            return(director);
        }