Пример #1
0
        public async Task <IActionResult> Insert()
        {
            QueryResponse <FoodCategory> categories = await foodCategoryService.GetAll();

            ViewBag.Categories = categories.Data;
            return(View());
        }
Пример #2
0
        public async Task <IActionResult> Insert()
        {
            QueryResponse <FoodCategory> categories = await foodCategoryService.GetAll();

            QueryResponse <Food> foods = await foodService.GetAll();

            QueryResponse <Meal> meals = await mealService.GetAll();

            ViewBag.Path       = environment.ContentRootPath + "//wwwroot//img//refeicao//";
            ViewBag.Categories = categories.Data;
            ViewBag.Foods      = foods.Data;
            ViewBag.Meals      = meals.Data;

            return(View());
        }