Exemplo n.º 1
0
        public ActionResult Specials()
        {
            ISpecialRepository repo = RepoFactory.CreateSpecialRepo();
            var model = repo.GetAll().ToList();

            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult Specials()
        {
            ISpecialRepository repo = RepoFactory.CreateSpecialRepo();

            AdminSpecialViewModel model = new AdminSpecialViewModel()
            {
                Specials = repo.GetAll().ToList()
            };

            return(View(model));
        }
Exemplo n.º 3
0
        public ActionResult Index()
        {
            ISpecialRepository special_repo = RepoFactory.CreateSpecialRepo();
            IVehicleRepository vehicle_repo = RepoFactory.CreateVehicleRepo();


            var indexView = new HomeIndexViewModel()
            {
                specials         = special_repo.GetAll().ToList(),
                featuredVehicles = vehicle_repo.GetAllFeatures()
            };

            foreach (var v in indexView.featuredVehicles.features)
            {
                v.VehicleImagePath = ImageFinder(v.VehicleId);
            }
            return(View(indexView));
        }