Daarto icon indicating copy to clipboard operation
Daarto copied to clipboard

Getting List of Roles

Open digioz opened this issue 4 years ago • 0 comments

I am trying to get a list of Roles by using _roleManager.Roles. Here is my code:

public class RoleManagerController : Controller { private RoleManager<ExtendedIdentityRole> _roleManager;

    public RoleManagerController(
        RoleManager<ExtendedIdentityRole> roleManager
    ) {
        _roleManager = roleManager;
    }

    public IActionResult Index() {
        var models = _roleManager.Roles;

        return View(models);
    }

}

But it looks like this property is not implemented:

https://github.com/giorgos07/Daarto/blob/f19411ecbb08d67fabf31c65984622f740373a6d/src/AspNetCore.Identity.Dapper/Stores/RoleStore.cs#L76

Is there another way to get the list of Roles?

Thanks, Pete

digioz avatar Sep 06 '20 15:09 digioz