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)); }
public async Task <ReadyAccount> CreateNewReadyAccountAsync(ReadyAccount readyAccount) { if (!AccountValidator.ValidateDefault(readyAccount)) { throw new InvalidOperationException(Resources.ReadyAccValidFail); } return(await _readyAccountsRepository.AddReadyAccountAsync(readyAccount)); }
public async Task UpdateReadyAccountAsync(ReadyAccount readyAccount) { if (!AccountValidator.ValidateDefault(readyAccount)) { throw new InvalidOperationException(Resources.ReadyAccValidFail); } await _readyAccountsRepository.UpdateReadyAccountAsync(readyAccount); }
public async Task <Account> CreateNewAccountAsync(Account account) { if (!AccountValidator.ValidateDefault(account)) { throw new InvalidOperationException(Resources.AccValidFailString); } return(await _accountsRepository.AddAccountAsync(account)); }