Consider following SQL statement –
SELECT * FROM Customers WHERE FirstName LIKE '%IS%'
This is will search for customers having ‘IS’ as part of first name, right?
I like the same statement to be in LINQ –
var names = from cust in customers where cust.FirstName ......
I am unable to specify that condition.
Can anybody help me out solve this.
Thanks for sharing your time and wisdom.
Most LINQ -> SQL translators will take a few regular methods from c# and translate them into SQL. Contains is a very common method to translate and works with linq2sql and EF
EDIT: (case insensitive)