// GET: Event public ActionResult Index(string eventName, int?page) { if (!(eventName is null)) { return(View("Index", eventAppService.GetAllEvents() .Where(e => e.Name .Contains(eventName)) .ToList().ToPagedList(page ?? 1, 9))); } return(View(eventAppService.GetAllEvents().ToPagedList(page ?? 1, 9))); }
public ActionResult Events() { return(View(eventAppService.GetAllEvents())); }