When using QueryableExtensions.ToDataSourceResult() from Telerik MVC, SQL following gets produced:
.. FROM [RMP].[V_UC_EQUIPMENT_LOG2_LOCALIZATION] WHERE ([Extent1].[LOG_TIME] >= convert(DateTimeOffset, ''2019-03-05 23:00:00.0000000 +00:00'', 121)) AND ([Extent1].[LOG_CLASS_ID] IN (78,7,18,30,19,16,17))
When we filter manually in code with linq, e. g.
.. table.Where(e => e.T_EquiID == 234234) ...
the linq provider produces a parameterized query as follows:
AND (@p__linq__0 = [Extent1].[T_EquiID])...
When using a parameterized query, Sql Server can reuse the execution plan much better saving compile time, which is in our case sometimes a big issue.
Please tell us, why can QueryExtensions do produce parameterized queries.
Hello,
We are declining this request as there was no additional information about the use-case.
Regards,
Viktor Tachev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.