Esempio n. 1
0
        public async Task <IActionResult> Update(int id)
        {
            var entity = await _functionService.FindAsync(id);

            if (entity == null)
            {
                return(RedirectToAction(nameof(Index)));
            }

            var viewModel = _mapper.Map <UpdateFunctionViewModel>(entity);

            await AssignHierarchicalFunctionsAsync(viewModel);

            return(View("Update", viewModel));
        }