Example #1
0
        public async Task Edit(EditRoleInputDto model)
        {
            log.LogInformation("Editing role {0} - new name = {1}", model.Id, model.Name);

            var role = await roleManager.FindByIdAsync(model.Id);

            if (role == null)
            {
                throw new Exception(String.Format("Role ID '{0}' not found!", model.Id));
            }

            role.Name = model.Name;
            await roleManager.UpdateAsync(role);
        }
Example #2
0
        public async Task <ActionResult> Edit(EditRoleInputDto model)
        {
            await rolesService.Edit(model);

            return(Ok());
        }