Get all users and their roles they got into a table asp.net mvc
<p>Im trying to figure out how to get all users and their Roles into a nice organized table, seen many different ways to go, but none has worked for me. i have gotten abit on the way atleast... anyone that can help me out?</p>

<p>With this code i get all the roles:</p>

<pre><code>        var context = new ApplicationDbContext();
        var roleStore = new RoleStore&lt;IdentityRole&gt;(context);
        var roleManager = new RoleManager&lt;IdentityRole&gt;(roleStore);
        var roles = (from r in roleManager.Roles select r.Name).ToList();
        ViewBag.Roles = roles.ToList();
</code></pre>

<p>and with this code i get all the registered users:</p>

<pre><code>        var context = new ApplicationDbContext();
        var userStore = new UserStore&lt;ApplicationUser&gt;(context);
        var userManager = new UserManager&lt;ApplicationUser&gt;(userStore);
        var users = (from u in userManager.Users select u.UserName).ToList();
        ViewBag.Users = users.ToList();
</code></pre>

<p>and finally with this code i get all the users id's</p>

<pre><code>        var context = new ApplicationDbContext();
        var user = (from u in userManager.Users select u.Id).ToList();
        ViewBag.id = user.ToList();
</code></pre>

<p>But how do i get All the users with their roles? i really cant figure it out</p>