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 ?
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 ?