i need to keep my project flexible to customer specific requirements and need your ideas 🙂
so i have my “default” database layout, on which i have my Entity Framework Model generated.
let’s take this for example:
we have 2 customers, A and B. everyone has their own database server but with the same database layout. Now my application decides on startup (on a given parameter), which customer database it takes, so i instanciate the ObjectContext on the given connection string.
Customer A wants an additional property, “Middle Name” in their employees table.
Customer B doesn’t care about middle names and uses the default layout.
i have no problem to update my EF Model, but then i have an unmapped property, if i choose the customer B database.
my only idea at the moment is to extend the entity object with a partial class. but is it possible at this point to add a property “middle name” and get the value from the database (if the column exists) ?
i would be grateful on any idea or thought.
greets,chris
No it is not possible. You must have model and databases with all properties from all customers. Higher layer of your application has to deal with customer specific requirements and hide unnecessary columns.