摘要:
因只有角色名能修改故继续使用创建角色的视图模型 using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace Shop.ViewModel { public class CreateEditRo 阅读全文
摘要:
首先创建视图模型 using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace Shop.ViewModel { public class CreateEditRoleViewModel { [ 阅读全文
摘要:
需要将目前所有角色名显示出来,方法同用户管理 一、创建Index acction public async Task<ActionResult> Index() { var roles = await _roleManager.Roles.ToListAsync(); return View(rol 阅读全文
摘要:
因角色管理需要有用户才能进行(需要将用户从角色中添加,删除)故角色管理代码依托用户管理 只需在Startup服务中添加角色管理即可完成 public void ConfigureServices(IServiceCollection services) { services.AddControlle 阅读全文