Пример #1
0
        public IActionResult Edit(
            [FromRoute] int id,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            var foodItem = FoodItems.FirstOrDefault(f => f.Id == id);

            if (foodItem == null)
            {
                return(NotFound());
            }

            return(View(foodItem));
        }