//method : returns car details by car ID (number) public CarInventory GetChosenCar(int CarID) // 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 (CarsLogic carsfromdb = new CarsLogic()) { return(carsfromdb.ChosenCar(CarID)); } }