public ActionResult EventDetails(int?EventID) { CategoryCityVM categorycityVM = new CategoryCityVM { PlaceEvents = repoPlaceEvent.GetAll().Include(i => i.Event).Where(f => f.EventID == EventID).Include(i => i.Place).Include(i => i.Event.Category).ToList(), }; return(View(categorycityVM)); }
public ActionResult Index() { //ViewBag.Category = new SelectList(db.Category.ToList(), "ID", "Name"); ViewBag.Category = new SelectList(repoCategory.GetAll().Where(w => w.ParentID == null), "ID", "Name"); CategoryCityVM categorycityVM = new CategoryCityVM { Categories = repoCategory.GetAll().Take(5).ToList(), Cities = repoCity.GetAll().ToList(), Headers = repoHeader.GetAll().ToList(), PlaceEvents = repoPlaceEvent.GetAll().Include(i => i.Event).Include(i => i.Place).Include(i => i.Event.Category).ToList(), TContents = repoTContent.GetAll().ToList(), }; return(View(categorycityVM)); //return View(repoSlider.GetAll().OrderBy(o => o.PIndex)); }