I know the new Membership includes a "Simple Role Provider."
I can't find any help related to creating a user and assigning a role when the user is created. I've added a user which created the tables on the DB correctly. I see the AspNetRoles
, AspNetUserRoles
, and AspNetUsers
tables.
I am wanting to assign a role from AspNetRoles
to a user in AspNetUsers
which the ID of both the role/user are to be stored in AspNetUserRoles.
I'm stuck on the programming part of where and how to do this when I create the user.
I have a dropdown list to select the role, but using the Entity CF along with the new ASP.NET Identity model I'm not sure how to take the ID of the selectedvalue from the dropdown and the UserID and assign the role.