I am using EF4.1 with MySql and unable to get LIKE query working. I want to get list of products where name like app
.Where(p=>p.Name.Contains("app") returns only one product with name Apple. The generated SQL contains LOCATE operator in place of LIKE '%app%'
I tried executing sql command using SqlQuery("select * from product where name like '%@p0%'", "app") but to no avail. It does not retrun any products.
Could some please suggest how can I write LIKE for MySql db. Thanks
-= JL =-