public ActionResult Specials() { var repo = MiscRepoFactory.CreateMiscRepo(); List <Specials> specials = repo.GetSpecials(); return(View(specials)); }
public ActionResult Index() { var vehicleRepo = VehicleRepoFactory.CreateVehicleRepo(); var miscRepo = MiscRepoFactory.CreateMiscRepo(); HomeVM homeVM = new HomeVM(); homeVM.Vehicles = vehicleRepo.GetFeaturedVehicles(); homeVM.Specials = miscRepo.GetSpecials(); return(View(homeVM)); }
public ActionResult Contact(ContactVM message) { var repo = MiscRepoFactory.CreateMiscRepo(); Contact contactMessage = new Contact(); if (ModelState.IsValid) { contactMessage.ContactName = message.ContactName; contactMessage.Email = message.Email; contactMessage.Phone = message.Phone; contactMessage.Message = message.Message; repo.InsertMessage(contactMessage); return(RedirectToAction("Index", "Home")); } else { return(View(message)); } }