标签: entity-framework
我使用EF5从DbContext加载一组实体,但每个实体都链接到多个表,并使其每次都加载相关的实体。无论如何,我可以关闭它,而不是手动投射到像
Entity Framework 4 - Repository Pattern - How to avoid full load of entity with nested relation?
答案 0 :(得分:0)
执行摘要:
Context.Configuration.LazyLoadingEnabled = false;
请参阅Enter Framework Loading options explained