Example #1
0
 public ActionResult EndSimulation()
 {
     foreach (var car in _repository.Cars.ToList())
     {
         RemoveParkingCar(car.CarID);
     }
     TempData["message"]           = "Simulation ended! All vehicles have left.";
     ParkingLot.TemporarySum       = ParkingLot.Sum;
     ParkingLot.TemporaryTotalCars = ParkingLot.TotalCars;
     _repositorySum.RemoveAll();
     ParkingLot.Reset();
     return(RedirectToAction("List"));
 }