// GET: Vehicles1/Receipt/5 public ActionResult Receipt(int id) { Vehicle vehicle = db.Vehicles.Find(id); var model = new ReceiptViewModel(vehicle); ParkingSpace ps = new ParkingSpace(parkingCapacity); ps.RemoveFromParkingSpace(vehicle); db.Vehicles.Remove(vehicle); db.SaveChanges(); return(View(model)); }