First I'd like to say that List<object>'s defination isn't so good……List<T> for you to define a generic List of specific type T,and we don't use object。Maybe you can use ArrayList instead。
And now your main question is that you should add a single quote——
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Dynamic linq with where clause --- contains
Feb 07, 2012 12:04 AM|LINK
First I'd like to say that List<object>'s defination isn't so good……List<T> for you to define a generic List of specific type T,and we don't use object。Maybe you can use ArrayList instead。
And now your main question is that you should add a single quote——
".Contains" + "('" + colv + "')";
Or just use parameter+value——
http://stackoverflow.com/questions/2455659/how-to-use-contains-or-like-in-a-dynamic-linq-query