EF Core 1.0 - Include() generates more than one queries

后端 未结 1 1036
被撕碎了的回忆
被撕碎了的回忆 2020-12-17 17:42

I am using EF 7.0.0-rc1-final.

The following statement generates multiple queries on the server. Is this normal or I am missing something ?

Group myG         


        
相关标签:
1条回答
  • 2020-12-17 18:33

    Yes, it’s normal even in one to many scenarios.

    EF7 generates multiple queries to avoid returning the same data multiple times.

    Here is a great post about EF6 Include to understand why this change was required for EF7: Entity Framework pitfalls, include

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