On Sat, Aug 21, 2010 at 16:56, Marco Castro <mcas...@mcsoft.com.br> wrote: > Hello, > > I'm trying this code in a LINQ statement in the last version of the > provider (August 16): > > ...where cl.ClientName.ToUpper().Contains("MARC%SMI") > > The generated SQL code is this: > > ...WHERE UPPER("Extent1"."CLIENTNAME") LIKE _UTF8'%MARC\%VIEI%' ESCAPE > _UTF8'\' > In my point of view, "\%" is not the best code. Or is there a way to get > this code: LIKE '%MARC%VIEI%'. In other words: I need that % is % as in the > LIKE specifications, it is not part of the seek string.
No, you can't do it with Contains. The Contains takes a string, not a pattern, it's how the method signature is done. But you can do it using i.e. StartsWith and EndsWith together. -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider