Search code examples
c#asp.netentity-frameworkef-code-firstasp.net-mvc-5

MVC5 Code First model is missing AspNetUserRoles


I just generated code first model from existing database in which I have asp.net identity 2.0 tables. From what I can see, the AspNetUserRoles cs file is missing although I've selected the table when I was creating the model.

Did anyone else stumble with this problem while generating the code first model from existing database?


Solution

  • The class is IdentityUserRole, but it won't exist anywhere in your code since it's part of the Entity Framework Identity code.