开发者

EF4 two models one database, possible?

I have been searching for this answer and can't seem to find anything, but with EF4 I want to create a base mode开发者_StackOverflow社区l and put in our 'foundation' and any new project we create if we need to add custom tables to that sites db is it possible to add a model with just those specific tables and link it to the model in our 'foundation' I can't seem to find a good resource on something like this and this seems to be like it would be a normal thing to have a reusable base model and a separate one for any one off's

Thanks for any help or pointers!


Yes - in a way.

You would end up having two separate, distinct Object contexts - one from your "foundation" with the basic tables and classes, and another from project-specific model.

Trouble is: you cannot move entities from one context to another... so as long as those entities never have to interact in any way, then you'll be fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜