Hi All,
Im currently using the following code to show what Roles exist and what users are associated to what Roles.
@foreach (var r in Roles.GetAllRoles())
{
<li>@r</li>
<ul>
@foreach (var u in Roles.GetUsersInRole(r))
{
<li>@u</li>
}
</ul>
}
Now this code lives in the View which i would imagine is a bad idea? Im not sure so I would like some imput into this including better/preferred methods for achieving the same output.
Along side this, If i were to use the above code, how would you put HTML links against each item which is found which would enable a user to remove either the user from the group, or the group itself?
Go to the complete details ...