giorgos07 / Daarto

Dapper implementation of ASP.NET Core Identity stores.
260 stars 51 forks source link

Getting List of Roles #18

Open digioz opened 4 years ago

digioz commented 4 years ago

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

public class RoleManagerController : Controller { private RoleManager _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