public ActionResult Specials() { ISpecialRepository repo = RepoFactory.CreateSpecialRepo(); var model = repo.GetAll().ToList(); return(View(model)); }
public ActionResult Specials() { ISpecialRepository repo = RepoFactory.CreateSpecialRepo(); AdminSpecialViewModel model = new AdminSpecialViewModel() { Specials = repo.GetAll().ToList() }; return(View(model)); }
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)); }