Click here to Skip to main content
15,893,644 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
in ASP.NET MVC 5 Identity,The relations data for Users and Roles is save in AspNetUserRoles table,and AspNetUserRoles table has two field:UserId,RoleId.but I want to add other field to this table,such as department field. so if an user login in different department,he will have different role .I don't know how do it.Thank you.
Posted

You can always do this thing pretty easily.The ASP.NET team made it fairly easy to extend IdentityUser, and also to get some basic Role management happening.

Please read the below article for getting full knowledge about it.

ASP.NET MVC 5 Identity: Extending and Modifying Roles
 
Share this answer
 
v2
Hello,

You can refer to the following article:

Adding Profile Data in ASP.Net Identity
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900