// 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));
     }
 }