V
V
V Sh.2017-02-20 07:28:29
ASP.NET
V Sh., 2017-02-20 07:28:29

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

1 answer(s)
H
heartdevil, 2017-02-20
@heartdevil

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 question

Ask a Question

731 491 924 answers to any question