is there a way in dynamic-linq library to select... where Column startswith

c# dynamic-linq

Question

I am trying to select the fields that start with something using dynamic querylibrary, I am limited to using the column name and fields to be in variables. I have tried:

var x = myqueriable.Where("" + X1  + " LIKE @0 and "  + X2 + "= @1 ", Y1 + "%", Y2);

i have error: "system.Linq.Dynamic.ParseException: Expression of type Boolean expected>

Is there a way to accomplish the mentioned?

1
1
4/19/2019 3:21:12 PM

Popular Answer

var x = myQueryable.Where(y => y.StartsWith(param0));
1
4/19/2019 2:26:16 PM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow