Randy Minder
Randy Minder

Reputation: 48542

Entity Framework - How best to handle large numbers of entities

We're currently a Linq to SQL shop but evaluating Entity Framework. One thing that always frustrated me with L2S is how messy the DBML canvas became after putting more than say a couple dozen tables on it. It just became one large mess.

I'm wondering if EF handles this any better? What would be ideal (for us) is the ability to have a separate EDM for each of our schema's. That would keep things very neat and tidy. However, I don't know then how we would establish relationships across EDM's.

Can anyone tell me how (or if) EF handles this sort of thing?

Upvotes: 0

Views: 130

Answers (2)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364409

Handling this in EDMX is possible but still it is far away from nice or ideal solution especially because it is not supported by designer - you will work with EDMX as XML. Also relations can be only one way, bidirectional relations between EDMX are not supported. ADO.NET team described the whole process on their blog.

If you have separate schema for some set of tables then tables probably represent some separate business domain where the connection to other schemas are not so common. Perhaps isolating the schema in completely separate model (EDMX) can be way to go.

Upvotes: 0

Matteo Mosca
Matteo Mosca

Reputation: 7458

Just my 2 cents.

I deeply recommend you to throw away dbml and edmx as well, and move to EF 4.1 code first. It will give you all the power and flexybility you need.

For me it was a no turning back ever. You can find excellent posts of Scott Guthrie about it if you google a little.

Upvotes: 2

Related Questions