Here I have created a Model Structure in asp.net mvc:
and setting some default values in the list and while I am adding the user in the list I assign the permission for pages to that user through the UI (by checking permission checkboxes), so that user can access only the assigned pages:
Now I want to do the same by using code first approach of database with the help of DbContext class.
I have a static list of page permission in a database table (Id =1, Name=Page1; Id =2, Name=Page2; Id =3, Name=Page3; Id =4, Name=Page4).
I am confused while creating model structure for database. Please guide me how to create model structure and mapping of structure with the tables.