Click here to Skip to main content
15,895,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am running into an issue with our Database model and the multiple versions that our customers can have. Normally, our tables remain fairly static, but occasionally we will add an additional column or two. Naturally, when the model is updated, this will break operations if a customer is running a version without those new columns.

My initial fix was to split the entities off, removing the new column from the original table, and placing it in a new entity with just the key, and creating an association. This worked well for other operations, but I am now running into an issue with Adds.

If I try an add on the database without the new column, I get the invalid column error. If I use my split entity method, using the entity without the new column, I get an error as it seems to require the reference to the new entity (which is probably expected).

As updating our customers DB's is not an option, and neither is creating a new table for all the new columns, I am hoping there is just some step I am missing to get this to work with the EntityFramework model.

So I guess my question is, is there a way to use all the functionality of EF with different versions of a database?
Posted
Comments
Simon_Whale 22-Aug-13 5:20am    
have you refreshed the entity framework models?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900