Example #1
0
        public IActionResult RoleUpdate(string id)
        {
            AppRole appRole = _rolemanager.FindByIdAsync(id).Result;

            if (appRole != null)
            {
                return(View(appRole.Adapt <RoleViewModel>()));
            }
            return(RedirectToAction("Roles"));
        }
Example #2
0
        public IActionResult RoleUpdate(string Id)
        {
            AppRole role = _roleManager.FindByIdAsync(Id).Result;

            if (role != null)
            {
                return(View(role.Adapt <RoleModel>()));
            }

            return(RedirectToAction("Roles", "Admin"));
        }
        public IActionResult RoleUpdate(string id)
        {
            AppRole role = roleManager.FindByIdAsync(id).Result;

            if (role != null)
            {
                return(View(role.Adapt <RoleViewModel>())); // mapster yardimiyla ayni isimlere sahip propertyler otomatik eslenecek. IdentityRole'de de name ve id var, RoleViewModel'de de name ve id var esleniyor. esliyoruz cunku olusturdugumuz guncelleme sayfasi RoleViewModel yapisiyla olusturulacak.
            }

            return(RedirectToAction("Roles"));
        }
Example #4
0
        public async Task <IActionResult> RoleUpdate(string RoleID)
        {
            AppRole role = await _roleManager.FindByIdAsync(RoleID);

            if (role == null)
            {
                //SAYFAYI GÜNCELLE
                return(RedirectToAction("Roles"));
            }

            //SUCCEED
            return(View(role.Adapt <RoleModel>()));
        }
Example #5
0
        public IActionResult RoleUpdate(string Id)
        {
            AppRole role = roleManager.FindByIdAsync(Id).Result;

            return(View(role.Adapt <RoleViewModel>()));
        }