AspnetIdentitySample icon indicating copy to clipboard operation
AspnetIdentitySample copied to clipboard

Store does not implement IQueryableRoleStore<TRole>

Open ranaanees opened this issue 11 years ago • 1 comments

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<TRole>

Help..

ranaanees avatar Apr 01 '14 12:04 ranaanees

Help Please...

ranaanees avatar Apr 02 '14 06:04 ranaanees