Thunderstruck
Thunderstruck copied to clipboard
SQL like does not work with parameters
I believe I have noticed a bug and it's a significant one.
In your readme you have this:
context.All<Car>("SELECT * FROM Cars WHERE Name LIKE %@0%", "Lotus");
But this causes an object ref error because there are no single quotes around the expression. But, when I try this:
var ads = context.All<myTable >("select * from myTable where Title like '%@0%'","Vis");
The parameter is ignored.
Don't supposed you can fix this?
I found a workaround so this might be by design and not a bug:
var ads = context.All<MyTable>("select * from Mytable where Title like @0","%Vis%");
Perhaps you could update the readme?
Hi @GusBeare, thanks for share this issue. I will fix the README.