-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Labels
Description
Hello,
I am tying to bind a dropdownlist with all roles in asp.net web forms app (VS 2013)...with following bind method...
public IQueryable<IdentityRole> BindRoles()
{
var roles = roleManager.Roles;
return roles;
}
How do I initialize...
public ApplicationDbContext context;
private UserManager<ApplicationUser> userManager;
public RoleManager<IdentityRole> roleManager;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
context = new ApplicationDbContext();
userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(context));
roleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(context));
}
Dropdownlist Binding: SelectMethod="BindRoles"
But when I run the page it has following error..
Store does not implement IQueryableRoleStore
Help..