Exemplo n.º 1
0
 public async Task <Transaction> GetTransaction(Guid transactionID)
 {
     using (PaymentGatewayEntities DB = new PaymentGatewayEntities())
     {
         return(await DB.Transactions.FindAsync(transactionID));
     }
 }
Exemplo n.º 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());
     }
 }
Exemplo n.º 3
0
 public async Task AddTransaction(Transaction transaction)
 {
     using (PaymentGatewayEntities DB = new PaymentGatewayEntities())
     {
         DB.Transactions.Add(transaction);
         await DB.SaveChangesAsync();
     }
 }