I would like to know if it is possible to do a wildcard search using LINQ.
I see LINQ has Contains, StartsWith, EndsWith, etc.
What if I want something like %Test if%it work%, how do I do it?
Regards
You can use SqlMethods.Like().
An example of the usage:
var results = from u in users where SqlMethods.Like(u.FirstName, "%John%") select u;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With