Entity Framework 4 - Handling very large (1000+ tables) data models?

前端 未结 3 402
逝去的感伤
逝去的感伤 2021-02-04 03:46

We\'ve got a database with over 1000+ tables and would like to consider using EF4 for our data access layer, but I\'m concerned about the practical realities of using it for suc

相关标签:
3条回答
  • 2021-02-04 04:05

    The number I heard in a Microsoft screencast is a maximum of roughly 250 tables per EF model. That doesn't mean EF can't handle more - it might just be sensible to break up your 1000+ tables into several logical groups of tables, and use one EF model per such logical group (with up to 250 tables in it).

    I highly doubt you'll have queries that will need to use all 1000 tables at once - most likely not even 10 at once. So you should definitely be able to split up your pretty large model into smaller clusters and turn each into a separate EF model.

    0 讨论(0)
  • 2021-02-04 04:13

    I'm sure not all 1000+ tables are related. Break it up into logical pieces.

    0 讨论(0)
  • 2021-02-04 04:17

    You should definately take a look at LLBLGen Pro v3. While LLBLGen is another O/RM tool, just like EF is an O/RM tool, the latest version contains a designer that allows you to generate models for LINQ to SQL, NHibernate, AND Entity Framework (both 1.0 and 4.0). Its designer is pretty solid and has better support for big domain models.

    0 讨论(0)
提交回复
热议问题