.Net Editor how to add raw Sql
.Net Editor how to add raw Sql

Hello. Is there any way to add raw sql to editor instance?
I want to add custom where, but I can't write it in existed Where function, because where condition written in other source.
I've tried to use it like this
string whereCondition = "DB_ID='MAM'" // this string only for example
editor.Where(whereCondition,"","")
but it doesn't work. I have an error.
I think parse this condition but I'm not sure it will be simple.
Replies
Generally no as the libraries need to understand what is happening. However, for a WHERE condition there is a lot more flexibility. If you have a look at the documentation here you'll see how you can create complex conditions by using a closure function.
Allan
Thanks Allan.
Make it like this and it works
Just make sure you aren't using front end submitted data in
whereCondition
when doing it like that. Otherwise you are open to an SQL injection attack!Allan