This is a migrated thread and some comments may be shown as answers.

Kendo UI Server Side Filtering + Paging : Nice to way to do sql Query server side

1 Answer 146 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Siby
Top achievements
Rank 1
Siby asked on 09 Apr 2014, 01:48 AM
How do I use the filterlist object to create SQL query to filter data...  {MVC5 Controller  and cshtml}

So we have custom paging on server side.  We only retrieve set number of records based on limit which works great!!!

Now we want to add filtering based on user input : mainly -  contains and startswith.....

In the Controller:  datasource  I have these values:
MemberName :  "columnName"
Operator          :   "starts with"
Value               :   "searchterm"

What is the best way to create sql statement to filter from a database...I can do this obviously with ExpressionVisitor   (ev)
ev.Where(   columnName   like  'searchterm%' )

Here i am building the sql expression...from the input...and also I need to verify the input is safe....(sql injection..)  How would I do this nicely via Kendo UI ?










1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 10 Apr 2014, 03:18 PM
Hello Siby,

The question does not seems to be related to KendoUI, but to general development of SQL queries. I would suggest searching the internet for similar questions.

http://stackoverflow.com/questions/9079400/control-sql-injection-in-mvc

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Siby
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or