2
Vote

Bug in IN Operator handler

description

There is a demo in the document for IN clause:
List<int> ids = new List<int>() { 1, 2, 3, 4 };
//becareful here,don't leave any whitespace around in(...) syntax.
dynamic products = Context.Sql(@"select * from Product
            where ProductId in(@0)", ids).QueryMany<dynamic>();
This will only work if the in keyword is lowercase.

Root cause is that Command\PartialClasses\Parameters.cs (Line 58) is using String.Replace to modify the old sql statement but this method is case sensitive, as a result it will not replace either "IN(@0)" nor "In(@0)"

Can this get fixed? I can submit a patch for this if it's ok.

comments