Declined
Last Updated: 10 Jun 2021 06:25 by ADMIN
Mario
Created on: 13 Mar 2019 11:56
Category: UI for ASP.NET MVC
Type: Feature Request
0
"Kendo.Mvc.Extensions.QueryableExtensions" with DataSourceRequest should produce parameterized queries

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.

2 comments
ADMIN
Viktor Tachev
Posted on: 10 Jun 2021 06:25

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/.

ADMIN
Konstantin Dikov
Posted on: 20 Mar 2019 11:47
Hi Mario,

We will definitely look into this and see if there could be an option for extending the ToDataSourceResult method, but meanwhile you could take a look at the following forum thread and the suggested custom implementation:
I could also suggest the Custom AJAX Binding, which gives the developer the freedom to retrieve the data manually:
Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.