Tuesday, 15 May 2012

mysql - entity framework LIKE query -


I am using EF4.1 with MySQL and unable to get the query working. I want to get a list of products where the name of the app is like

. Where (P = & gt; p.Name.Contains ("app") returns a product with only the name. The generated operator has the LOCATE operator in SqlQuery ("Select from product where name ''% @ p0% ' ", By the name of" app "), but tried to execute the sql command for no benefit.

< / Div>

">

I do not know EF (yo nor hablo Microsoft), but I'm sure that your literal wildcard parameter is hand-in-hand with

If you try something like the following, then what is this SqlQuery ("Select from the product" where the Context ('%', @ P, '%'), " "What is the" parameter "?

Also, try:

SqlQuery ("Select from p * roduct where name @ p0", "'% app%'")

I'm sure one of these will do.

No comments:

Post a Comment