public IActionResult Index() { ChefsView viewModel = new ChefsView(); viewModel.Chefs = dbContext.Chefs .Include(d => d.CreatedDishes) .ToList(); return(View("Index", viewModel)); }
public IActionResult DisplayChefs() { ChefsView viewModel = new ChefsView(); viewModel.Chefs = dbContext.Chefs .Include(d => d.Dishes) .ToList(); return(View("ChefDisplay", viewModel)); }