public async Task<IActionResult> Index(int id)
{
List<Event> events = _context.Event.AsNoTracking()
.Where(c => c.EventTribe == id && c.EventStatus == 1 || c.EventTribe == 11 && c.EventStatus == 1)
.OrderBy(c => c.EventYear)
.ToList();
if (events == null)
{
return RedirectToAction("Index", "Home");
}
return View(events);
}
public async Task<IActionResult> Index(int id)
{
List<Event> events = _context.Event.AsNoTracking()
.Where(c => c.EventTribe == id && c.EventStatus == 1 || c.EventTribe == 11 && c.EventStatus == 1)
.OrderBy(c => c.EventYear)
.ToList();
if (events == null)
{
return RedirectToAction("Index", "Home");
}
return View(events);
}