Exemple #1
0
        public IActionResult Index()
        {
            ChefsView viewModel = new ChefsView();

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

            viewModel.Chefs = dbContext.Chefs
                              .Include(d => d.Dishes)
                              .ToList();

            return(View("ChefDisplay", viewModel));
        }