Пример #1
0
        private async Task <Account> CreateAsync(Account item)
        {
            CheckBeforeCreate(item);

            var hashedPassword = _hashManager.Hash(item.Password);

            var account = AbstractionsConverter.ToAccount(item, hashedPassword);

            await _context.Accounts.AddAsync(account);

            await _context.SaveChangesAsync();

            return(DataConverter.ToAccount(account));
        }