public async Task UpdateFreshAccountAsync(FreshAccount freshAccount)
        {
            if (!AccountValidator.ValidateDefault(freshAccount))
            {
                throw new InvalidOperationException(Resources.FreshAccValidFailString);
            }

            await _freshAccountsRepository.UpdateFreshAccountAsync(freshAccount);
        }
        public async Task <FreshAccount> CreateNewFreshAccountAsync(FreshAccount freshAccount)
        {
            if (!AccountValidator.ValidateDefault(freshAccount))
            {
                throw new InvalidOperationException(Resources.FreshAccValidFailString);
            }

            return(await _freshAccountsRepository.AddFreshAccountAsync(freshAccount));
        }
Пример #3
0
        public async Task <ReadyAccount> CreateNewReadyAccountAsync(ReadyAccount readyAccount)
        {
            if (!AccountValidator.ValidateDefault(readyAccount))
            {
                throw new InvalidOperationException(Resources.ReadyAccValidFail);
            }

            return(await _readyAccountsRepository.AddReadyAccountAsync(readyAccount));
        }
Пример #4
0
        public async Task UpdateReadyAccountAsync(ReadyAccount readyAccount)
        {
            if (!AccountValidator.ValidateDefault(readyAccount))
            {
                throw new InvalidOperationException(Resources.ReadyAccValidFail);
            }

            await _readyAccountsRepository.UpdateReadyAccountAsync(readyAccount);
        }
Пример #5
0
        public async Task <Account> CreateNewAccountAsync(Account account)
        {
            if (!AccountValidator.ValidateDefault(account))
            {
                throw new InvalidOperationException(Resources.AccValidFailString);
            }

            return(await _accountsRepository.AddAccountAsync(account));
        }