コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }