Answer the question
In order to leave comments, you need to log in
How to create such authorization on mvc 5?
Good afternoon!
I create the following authorization structure: there is a table of users (Users), a table of roles (Roles) and a table of departments (Departments). The relationship between tables is many-to-many, i.e. the output should be the UsersRolesDepartments super-table. How to create a many-to-many class (for example, UsersRoles) I know, but how are many-to-many-to-many classes created? And is it possible in Entity Framework?
Answer the question
In order to leave comments, you need to log in
EF will reflect your database model into classes (in theory).
And you will have three
Users
Roles
Departments classes.
With all relevant relationships as properties or a collection of properties.
You don't need any supertables.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question