❔ Linq statement doesn't work
I have an array of strings
[ "text1", "text2", "text3"]
and I want to find all Names that have a substring such as: text1somethingsomething
9 Replies
this is my entire code:
"doesn't work" isn't very helpful. whats the error
the
strArray.Any
portion probably isn't translatablei got the solution here (should have said this in OP): https://stackoverflow.com/questions/2912476/using-c-sharp-to-check-if-string-contains-a-string-in-string-array
Stack Overflow
Using C# to check if string contains a string in string array
I want to use C# to check if a string value contains a word in a string array. For example,
string stringToCheck = "text1text2text3";
string[] stringArray = { "text1", "someothertext", etc... };
...
not everything you can do normal in LINQ is translatable to SQL with EF
ah..
You can use
EF.Functions.Like()
instead maybeWas 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.