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