public Transaction GetTransaction(Guid id) { using (var context = new WebWalletContext(_optionsBuilder.Options)) { return(context.Transaction.SingleOrDefault(o => o.Id == id)); } }
public ICollection <Transaction> GetTransactions() { using (var context = new WebWalletContext(_optionsBuilder.Options)) { return(context.Transaction.ToList()); } }
public BankAccount GetBankAccount(Guid id) { using (var context = new WebWalletContext(_optionsBuilder.Options)) { return(context.BankAccount.SingleOrDefault(o => o.Id == id)); } }
public ICollection <BankAccount> GetBankAccounts() { using (var context = new WebWalletContext(_optionsBuilder.Options)) { return(context.BankAccount.ToList()); } }
public void UpdateTransaction(Transaction bankAccount) { using (var context = new WebWalletContext(_optionsBuilder.Options)) { context.Transaction.Update(bankAccount); context.SaveChanges(); } }
public void UpdateBankAccount(BankAccount bankAccount) { using (var context = new WebWalletContext(_optionsBuilder.Options)) { context.BankAccount.Update(bankAccount); context.SaveChanges(); } }