public void UpdateTransaction(Transaction bankAccount) { using (var context = new WebWalletApiContext(_optionsBuilder.Options)) { context.Transaction.Update(bankAccount); context.SaveChanges(); } }
public void UpdateBankAccount(BankAccount bankAccount) { using (var context = new WebWalletApiContext(_optionsBuilder.Options)) { context.BankAccount.Update(bankAccount); context.SaveChanges(); } }
public void DeleteTransaction(Guid id) { using (var context = new WebWalletApiContext(_optionsBuilder.Options)) { var transaction = GetTransaction(id); context.Transaction.Remove(transaction); context.SaveChanges(); } }
public void DeleteBankAccount(Guid id) { using (var context = new WebWalletApiContext(_optionsBuilder.Options)) { var bankAccount = GetBankAccount(id); context.BankAccount.Remove(bankAccount); context.SaveChanges(); } }
public int Complete() { return(_context.SaveChanges()); }