Entity Framework (ASP.NET): How do you update the column mapping after adding a column to the framework?

entity entity-framework

Question

I added a column to the Entity and then I go to generate the database from the model or build the solution and I get the message that the new column I just added is not mapped. The database was previously created from the model with no errors.

When I right click on the Entity and select Table Mapping, I can see the old columns there mapped but I don't see a way to m

1
8
5/7/2011 4:04:24 PM

Popular Answer

The only way I've found to resolve it without "update model from database" (what causes other issues in my legacy project) is to edit the .edmx file with the XML editor, add the property (Name and Type) to the EntityType and save. After that when I open the .edmx editor the added property is there for mapping.

8
10/2/2015 10:43:30 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow