public virtual ActionResult RentDetails(DateTime pickupDate, DateTime returnDate, int carGroupId) { var carGroup = context.CarGroups.Include(c => c.CarGroupDetails).First(c => c.Id == carGroupId); var viewModel = new RentDetailsViewModel() { PickupDate = pickupDate, ReturnDate = returnDate, CarGroup = carGroup, Price = PriceHelper.Calculate(pickupDate, returnDate, carGroup.DayPrice), }; return(View(MVC.Rentals.Views.RentDetails, viewModel)); }