private void CreateRoles() { DSDbContext db = new DSDbContext(); var roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(db)); if (!roleManager.RoleExists("Admin")) { var role = new IdentityRole(); role.Name = "Admin"; roleManager.Create(role); } if (!roleManager.RoleExists("User")) { var role = new IdentityRole(); role.Name = "User"; roleManager.Create(role); } }
public DSUserStore(DSDbContext context) : base(context) { }
public ValuesController(DSDbContext context) { this.context = context; }