Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个与大量子实体相关联的父实体。
linq to sql 有没有办法只获取父实体而不附加其他子实体?
LINQ to SQL 默认使用延迟加载。除非您遍历它们,否则它不会加载子集合。
要关闭延迟加载,请设置DataContext.DeferredLoadingEnabled为 false。
DataContext.DeferredLoadingEnabled