Пример #1
0
        public IActionResult Edit(int id)
        {
            var part = parts.ById(id);

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

            return(View(new PartFormViewModel
            {
                Name = part.Name,
                Price = part.Price,
                Quantity = part.Quantity,
            }));
        }