none
entity framework LIKE query RRS feed

  • Question

  • 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 =-

    Wednesday, March 27, 2013 3:29 AM

All replies

  • Hi Job Lot;

    This is not an issue With Entity Framework but with the MySQL provider. Please see there web site for how to get it to work at this bug page. 

      


    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Wednesday, March 27, 2013 3:51 AM
  • and where will i find .NET 4 version of the MySqlProviderManifest class? thanks


    -= JL =-

    Wednesday, March 27, 2013 4:21 AM
  • Seeming that is a third party component you will need to post that question on the MySQL site. Sorry but I don't know how to configure that.

    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Wednesday, March 27, 2013 4:25 AM