//private RentCarEntities dal = new RentCarEntities();
        //private CarsDal dal = new CarsDal();

        public List <OrderList> GetAllOrders() // the methoda is called because its named Get... and by the call from the JQuery
        {
            using (CarsDal dal = new CarsDal())
            {
                return(dal.OrderLists.ToList());
            }
        }
Example #2
0
 public IEnumerable <CarInventory> GetAllCars() // the methoda is called because its named Get... and by the call from the JQuery
 {
     //using (RentCarEntities dal=new RentCarEntities())
     //{
     //    return dal.carinventories.ToList();
     //}
     using (CarsDal dal = new CarsDal())
     {
         return(dal.CarInventories.ToList());
         //return null;
     }
 }