Exemple #1
0
 public async Task <Transaction> GetTransaction(Guid transactionID)
 {
     using (PaymentGatewayEntities DB = new PaymentGatewayEntities())
     {
         return(await DB.Transactions.FindAsync(transactionID));
     }
 }
Exemple #2
0
 public async Task <List <Transaction> > GetTransactions(Guid merchantAccountID)
 {
     using (PaymentGatewayEntities DB = new PaymentGatewayEntities())
     {
         return(await DB.Transactions.Where(x => x.MerchantAccountID == merchantAccountID).ToListAsync());
     }
 }
Exemple #3
0
 public async Task AddTransaction(Transaction transaction)
 {
     using (PaymentGatewayEntities DB = new PaymentGatewayEntities())
     {
         DB.Transactions.Add(transaction);
         await DB.SaveChangesAsync();
     }
 }