时间:2021-07-01 10:21:17 帮助过:5人阅读
处理方法例如以下:
IQueryable<Data> data = this.ObjectContext.Data.Where(d => d.Name.StartsWith("測试")); ObjectQuery<Data> oq=data as ObjectQuery<Data>; String sql=oq.ToTraceString();
SELECT [Extent1].[ID] AS [ID], [Extent1].[Name] AS [Name] FROM (SELECT [Data].[ID] AS [ID], [Data].[Name] AS [Name] FROM [dbo].[Data] AS [Data]) AS [Extent1] WHERE [Extent1].[Name] LIKE '測试%'
获取EF查询的SQL语句
标签:tar 查询 article query start rac his mod 执行