![]() Adding a new property to an EDMX entity and then trying to send it to the database through migrations throws error saying that the new property doesn't have a mapping column.It generates empty Up() and Down() functions. Adding new properties to my ApplicationUser class doesn't seem to have any effect when I run Add-Migration and Update-database commands.If I have two models, which of the model classes correspond to AspnetUsers table the default ApplicationUser class or the AspNetUser class generated by the EDMX? I mean which of these classes will be used by migrations to update my table's structure?.Do I have more than one model in my project, namely the default Models file and the one generated by EDMX?.Am I using Code-First or Model-First, or a mix of both (Does such a mix work)?.Here are the questions and problems I face: This obviously brings in Identity tables into the diagram as well, which is good because I'll be adding my business domain tables and linking them to Identity tables through the model and then use migrations to update my database. ![]() Now I add a new EDMX to my project and import all my DB tables into it. I did that and the database was generated/updated. The default project contains IdentityModels file which suggests that I should add custom properties to ApplicationUser class and then use migrations to update my database. ![]() This is a Web Forms project using Identity + EF for user management. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |