SQL Server "User-Schema Separation" and Entity Framework issues
I have been fooling around with EF with a database that has implemented user-schema separation with a twist, there are multiple tables with the same name but are separated via the schema.
So like:
admin.tasks
staff.tasks contractor.tasksWhen I created my EF model I noticed that there were 3 tasks tables:
tasks
tasks1 tasks2Is this by design?
Also is there a way to tell EF to add the schema to the name of the entity or am I开发者_运维百科 SOL and doing it myself?
I believe that the Entity Framework Runtime Model Adapter library on Codeplex from the mind of Brandon Haynes may solve your problem. It will allow you to change the schema name at runtime. As long as the schema of the table is the same in each case this should be fairly simple to implement.
精彩评论