【发布时间】:2011-03-21 05:31:31
【问题描述】:
有什么方法可以强制 LINQ-2-SQL 为EntityRef 编译和缓存计划。
通过内部分析,我们看到大量 CPU 用于继续重新编译计划。
System.Reflection.Emit.DynamicMethod.CreateDelegate System.Data.Linq.SqlClient.ObjectReaderCompiler.Compile System.Data.Linq.SqlClient.SqlProvider.GetReaderFactory System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Compile System.Data.Linq.CommonDataServices+DeferredSourceFactory`1.ExecuteKeyQuery System.Data.Linq.CommonDataServices+DeferredSourceFactory`1.Execute System.Linq.Enumerable.SingleOrDefault System.Data.Linq.EntityRef`1.get_Entity我更喜欢使用实体引用,但我想如果别无选择,我们可以手动编写代码。
【问题讨论】:
标签: c# linq linq-to-sql