积极答复者
关于Entity Framework在大型数据库项目中应用的疑问

问题
答案
-
50-100个数据对象 不能算大型
通常说的大型数据库更多是指数据量方面,不仅仅是数据库表对象。
如果您使用过某些ORM工具,那么你也可简单的认为Entity Framework也是一种ORM工具。其实对于企业应用和一些快速开发ORM工具都是很适合的,但是对于一些有着特殊性能要求的场景ORM工具不是很合适,毕竟ORM工具封装了太多了东西,可能会对性能带来负面影响。这个时候数据访问层还是定制构建比较合适。
family as water- 已标记为答案 Cookie Luo 2011年2月21日 8:03
-
你好
这个是一篇讨论Entity Framework性能的文章。可以先看看了解下。
Cookie Luo[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Cookie Luo 2011年2月21日 8:03
-
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).
We have seen quite a few requests coming in from various folks asking for some guidance on best practices around working with large entity models in an Entity Framework application. The following post tries to describe the typical issues you would face when using a large entity model and tries to provide some guidance that hopefully will help mitigate some of these issues........
http://drc.ideablade.com/xwiki/bin/view/Documentation/LargeModels
It is impractical to build Entity Framework v.4 models with more than roughly 300 entity types. That's an unfortunate technical limitation but it shouldn't stop you.
A 2009 essay, Large EF Models, describes the Entity Framework "large model problem" and the technical options available to you for breaking them up. It's a bit dated - it talks about EF v.1 - but still useful ... and the problem is still severe in Entity Framework version 4.
We feel the EF technical obstacles should be irrelevant. We think the desire for large models is misplaced and that, even if technically feasible, you should avoid them. We feel that the best approach is to design large applications in modular fashion with several moderately sized models, one for each module "domain"......
http://thedatafarm.com/blog/data-access/entity-framework-designer-and-large-databases/
Entity Framework Designer and Large Databases
- 已标记为答案 Cookie Luo 2011年2月21日 8:03
全部回复
-
50-100个数据对象 不能算大型
通常说的大型数据库更多是指数据量方面,不仅仅是数据库表对象。
如果您使用过某些ORM工具,那么你也可简单的认为Entity Framework也是一种ORM工具。其实对于企业应用和一些快速开发ORM工具都是很适合的,但是对于一些有着特殊性能要求的场景ORM工具不是很合适,毕竟ORM工具封装了太多了东西,可能会对性能带来负面影响。这个时候数据访问层还是定制构建比较合适。
family as water- 已标记为答案 Cookie Luo 2011年2月21日 8:03
-
你好
这个是一篇讨论Entity Framework性能的文章。可以先看看了解下。
Cookie Luo[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Cookie Luo 2011年2月21日 8:03
-
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).
We have seen quite a few requests coming in from various folks asking for some guidance on best practices around working with large entity models in an Entity Framework application. The following post tries to describe the typical issues you would face when using a large entity model and tries to provide some guidance that hopefully will help mitigate some of these issues........
http://drc.ideablade.com/xwiki/bin/view/Documentation/LargeModels
It is impractical to build Entity Framework v.4 models with more than roughly 300 entity types. That's an unfortunate technical limitation but it shouldn't stop you.
A 2009 essay, Large EF Models, describes the Entity Framework "large model problem" and the technical options available to you for breaking them up. It's a bit dated - it talks about EF v.1 - but still useful ... and the problem is still severe in Entity Framework version 4.
We feel the EF technical obstacles should be irrelevant. We think the desire for large models is misplaced and that, even if technically feasible, you should avoid them. We feel that the best approach is to design large applications in modular fashion with several moderately sized models, one for each module "domain"......
http://thedatafarm.com/blog/data-access/entity-framework-designer-and-large-databases/
Entity Framework Designer and Large Databases
- 已标记为答案 Cookie Luo 2011年2月21日 8:03