Пример #1
0
        public async Task <IActionResult> Put(int id, WarehouseIndexViewModel model)
        {
            var warehouse = await _warehouseRepository.GetByIdAsync(id);

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

            model.Name    = warehouse.Name;
            model.Address = warehouse.Address;
            model.Vendor  = warehouse.Vendor;

            return(View(model));
        }