I have a horrifically huge table/view (623 columns) upstream from me, and I need to read source data from it for my application, and two new columns (varchar(255) and bit) that I need have been added with the latest release. We are using Entity Framework 6.0, using database first.
Caveats: the absurd number of columns is mostly out of my control, but we may be able to delete some columns we don't need in our local copy. It's from a view we're presented from further upstream.
I tried to update the model from database, and the new columns were not added as scalar properties. I manually created scalar properties (string & boolean), which obviously resulted in error due to no mapping to the table. However, when I scroll thru the table, I don't see the columns in the list. I CAN go into SQL and select those columns in a query, so I know they exist. The two properties I created show up in the dropdown list of the Mapping Details.
Is there an upper limit to how many columns are picked up by EF? Or a manual way to map scalar properties to columns in the underlying table when using DB first?
This is at least a workaround: I was able to get the columns to show up by deleting the table from the EDMX file and then adding it again. The old entity had 579 mapped columns, and the new one has all 623. Now I just have to redo all my foreign keys / navigation properties because the source lacks them...
It took quite some time for it to generate the entity, so I'm guessing there may be an issue with autogeneration of entities for tables with absurd numbers of columns, and as Sam said, it will be moot with EF 7.0 (hopefully).