Reputation: 17895
I'm working on rather large database. There will be about 200-300 tables total. First of all, did anybody have such database in single EDMX? In my experience designer gets unusable when you get more then 50 or so entities.
In my case database splits itself rather nicely into subject areas like Membership, System, Assets, etc..
This is what with EDMX and everything works more or less OK.
Here is issue I bet everyone has.. I have all main entities reference User table with fields like CreatedBy, UpdatedBy. And User table lives in separate EDMX.
For CUD operations I can deal with this fine because I have current user hanging around. But for retreival I often need to display ID of who created record and for that I need a join. But I can't join to table in different EDMX.
I see 2 solutions to this:
I realize that for what I'm doing - #1 is probably OK. But I can see how I may need to join entities from different models in future and wonder how you guys handle this?
Upvotes: 1
Views: 1812
Reputation: 6849
edmx is only defines a conceptual model of your database. So it is OK to add user tables to multiple edmx files.
Option #2 seems alright.
You would need to have a different names for the tables that repeat in multiple edmx files to avoid conflict. Something like SystemUser, AssetUser all actually pointing to the same User table.
Thanks.
Upvotes: 2