Entity Framework提供了三种加载相关实体的方法:Lazy Loading,Eager Loading和Explicit Loading.首先我们先来看一下MSDN对三种加载实体方法的定义. Lazy Loading:对于这种类型的加载,在您访问导航属性时,会从数据源自动加载相关实体. 使用此加载类型时,请注意,如果实体尚未在 ObjectContext 中,则您访问的每个导航属性都会导致针对数据源执行一个单独的查询. Eager Loading:当您了解应用程序需要的相关实体的图形…