✅ MVC to Blazor

Hello! so awhile ago, I made an mvc. I am now attempting to port the code over into a new blazor project but am unsure on how to do this, as with the mvc I had 1 view called Events, which would get opened via clicking a button in a drop down menu that would open the view with different data based on which drop down button you clicked. but with Blazor, through all my research I don't think it is possible to return a page as such. here is some of my code from the mvc, any help would be greatly apricated!


The event controller:
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);
}
Was this page helpful?