// GET: Transactions
 public ActionResult Index(int?id)
 {
     if (id == null)
     {
         return(View(transactionRepository.GetAll()));
     }
     else
     {
         if (id.HasValue)
         {
             id2 = id.Value;
         }
         List <Transactions> tr = transactionRepository.GetAllbyid(id2);
         return(View(tr));
     }
 }
예제 #2
0
        public void GetAlltransactionsTest()
        {
            var actual = repository.GetAll().ToList();

            Assert.That(collectionInit, Is.EquivalentTo(actual).Using(new TransactionComparer()));
        }
 public IEnumerable <Transaction> GetAll()
 {
     return(repository.GetAll());
 }
        public IEnumerable <Transaction> Get()
        {
            var Txn = _TxnRepo.GetAll();

            return(Txn);
        }
예제 #5
0
 public IQueryable <Transactions> GetTransactionsOnAccount(int accountId)
 {
     return(_transactionsRepository.GetAll().Where(r => r.AccountId == accountId));
 }