Example #1
0
        public async Task <IActionResult> Create(SectorViewModel viewModel)
        {
            if (ModelState.IsValid)
            {
                var sector = await _service.CreateSector(viewModel);

                await _service.CreateSectorShelves(viewModel, sector.Id);

                return(RedirectToAction(nameof(Index)));
            }

            return(View(viewModel));
        }