C
C#2y ago
murtruby

No applicable method 'Contains' exists in type 'String' (at index 31) when using KendoNet.DymaicLinq

I have a a web app that I've built using Kendo's component library and I'm trying to introduce backend paging, sorting, and filtering. The problem is when Kendo is calling the DynamicLinq IQueryable Where extension method it's throwing the above error when using string operations not just contains. An example of the string it uses for the predicate is "((LastName != null && LastName.Contains(@0)))". I've tested this without the surrounding brackets and it still runs but throws the same error. I've included a screen shot that shows how the predicate is built.
2 Replies
Anton
Anton2y ago
idk the cause of your issue but some suggestions use StringBuilder if you can help it. your string allocations must be over the roof rn String.Join works with IEnumerable
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server