1
我想在实体框架3,5中使用.ToTraceString()生成sql查询; 但我收到以下错误从实体框架生成sql查询
不能键入“System.Collections.Generic.List到‘转换System.Data.Objects.ObjectQuery’
我有以下代码 我需要生成SQL查询
customers= ent.Customer .Include("UserType") .Include("User") .Where(c => c.Enabled == true) .ToList<Customer>();
如何获得由实体框架生成的SQL查询。我没有sql profiler。
非常感谢