ASP.net Identity 2.1 Get all users with roles
问题 How can I get a list of users including the role name per user? My app has the default tables of an MVC Project. I'm able to retrieve all users using Identity 2.1 like this: Model public class GetVendorViewModel { public IList<ApplicationUser> Vendors { get; set; } } Controller public ActionResult Index() { var manager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext())); var roleStore = new RoleStore<IdentityRole>(ac); var roleManager = new