Exemplo n.º 1
0
        public IActionResult EditRole(int id)
        {
            var role = _userRolesService.GetUserRoleById(id);

            if (role == null)
            {
                return(RedirectToAction("Roles"));
            }

            var model = AutoMapper.Mapper.Map <Role, RoleViewModel>(role);

            model.Title  = "Edit Role";
            model.Action = "EditRole";

            return(View(_userRoleView, model));
        }