public ActionResult ParkCarStep1(int? carId) { if (carId == null) return HttpNotFound(); using (_db) { var employees = (from e in _db.employees from r in _db.registrations.Where(x => x.EmployeeId == e.Id).DefaultIfEmpty() orderby r.Date descending select e).ToList(); var rm = new RegistrationModel { Car = _db.cars.Find(carId), Employees = employees }; return View(rm); } }
public ActionResult ParkCarStep2(int? carId, int? empId) { if (carId == null || empId == null) return HttpNotFound(); using (_db) { var rm = new RegistrationModel { Car = _db.cars.Find(carId), Employee = _db.employees.Find(empId) }; return View(rm); } }