public IActionResult Index() { var bookingVm = new BookingVm(); var allCustomers = _customerRepository.GetAllCustomers(); var listOfCustomers = _customerRepository.AllCustomerList(allCustomers); var allCars = _carRepository.GetAllCars().Where(x => x.Booked == false && x.ForRent == true); var listOfCars = _carRepository.AllCarList(allCars); bookingVm.AllCustomers = listOfCustomers; bookingVm.AllCars = listOfCars; return(View(bookingVm)); }