public ActionResult Index() { HomeViewModel HomeVM = new HomeViewModel(); VehicleRepository VehicleRepository = new VehicleRepository(); WorkingPointRepository WorkingPointRepository = new WorkingPointRepository(); VehicleServiceCompanyRepository ServiceCompanyRepository = new VehicleServiceCompanyRepository(); ReviewRepository ReviewRepository = new ReviewRepository(); HomeVM.Vehicles = VehicleRepository.GetVehicleCount(); HomeVM.Workingpoints = WorkingPointRepository.GetWorkingPointCount(); HomeVM.Services = ServiceCompanyRepository.GetServiceCompanyCount(); HomeVM.Reviews = ReviewRepository.GetRevirewCount(); return(View(HomeVM)); }
public ActionResult Index(String message, String email, String name) { HomeViewModel HomeVM = new HomeViewModel(); VehicleRepository VehicleRepository = new VehicleRepository(); WorkingPointRepository WorkingPointRepository = new WorkingPointRepository(); VehicleServiceCompanyRepository ServiceCompanyRepository = new VehicleServiceCompanyRepository(); ReviewRepository ReviewRepository = new ReviewRepository(); HomeVM.Vehicles = VehicleRepository.GetVehicleCount(); HomeVM.Workingpoints = WorkingPointRepository.GetWorkingPointCount(); HomeVM.Services = ServiceCompanyRepository.GetServiceCompanyCount(); HomeVM.Reviews = ReviewRepository.GetRevirewCount(); SendEmail(message, name, email); return(View(HomeVM)); }