public async Task <int> AddAsync(ContaCorrente.Model.Account account) { var newAccount = await Uow.Accounts.AddAsync(account); Uow.Commit(); return(newAccount); }
public async Task <int> UpdateAsync(ContaCorrente.Model.Account account) { Account accountToUpdate = await Uow.Accounts.FindAsync(c => c.Id == account.Id); if (accountToUpdate == null) { throw new ArgumentNullException("Account"); } var newAccount = await Uow.Accounts.UpdateAsync(account); this.Uow.Commit(); return(newAccount); }