What is the process I should follow to update my entity framework model when I have simply added a new column to a table in the database? The process that I have followed was to right click within the edmx file and choose "Update Model from Database". Now I can see the new field against the table definition in the Store. But when I look at the table mapping for the entity itself I see that my new column shows up but is not mapped to a property on the entity. Surely I don't have to manually add a property to the entity?
R – Entity Framework – Update Model from Database – New Column
entity-frameworkupdatemodel
Related Topic
- .net – Entity Framework 4 mapping fragment error when adding new entity scalar
- C# – Validation failed for one or more entities while saving changes to SQL Server Database using Entity Framework
- C# – Fastest Way of Inserting in Entity Framework
- C# – Entity Framework Timeouts
- C# – Entity Framework Provider type could not be loaded
- Entity-framework – How to update only one table for model from database with Entity Framework
Best Answer
I've realised this was not really a problem - the only problem was my understanding of what was happening. The new column I was referring to was actually a foreign key relationship with another table and therefore it did show up as a navigation property . When I go and add a column to my table that is not a foreign key it shows up as expected when using "Update Model from Database".