コード例 #1
0
        public ActionResult Index()
        {
            IVehicleRepository  myRepo = VehicleRepositoryFactory.GetRepository();
            SpecialsAndVehicles model  = myRepo.GetSpecialsAndFeaturedVehicles();

            return(View(model));
        }
コード例 #2
0
        public SpecialsAndVehicles GetSpecialsAndFeaturedVehicles()
        {
            var model = new SpecialsAndVehicles
            {
                FeaturedVehicles = GTAVehicleList.GTAVehicles.Where(v => v.IsFeatured == true).ToList(),
                Specials         = GTASpecialList.GTASpecials.ToList()
            };

            return(model);
        }
コード例 #3
0
        public SpecialsAndVehicles GetSpecialsAndFeaturedVehicles()
        {
            var model = new SpecialsAndVehicles
            {
                FeaturedVehicles = GetAllVehicles().Where(v => v.IsFeatured == true).ToList(),
                Specials         = GetAllSpecials().ToList()
            };

            return(model);
        }