<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : 2010-&gt;2012 query generation issue</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : 2010-&gt;2012 query generation issue</description>
  <pubDate>Fri, 10 Apr 2026 18:55:15 -700</pubDate>
  <lastBuildDate>Mon, 18 Mar 2013 16:00:33 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=4032</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>2010-&gt;2012 query generation issue :   katit, FilterOperator.Contains...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4032&amp;PID=16051#16051</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 4032<br /><strong>Posted:</strong> 18-Mar-2013 at 4:00pm<br /><br />katit, FilterOperator.Contains will be translated into a SQL LIKE clause if the "IgnoreCase" option on the PredicateDescription is turned off.&nbsp; By default it's on, so a ToLower method is added to both the property and value clauses, which in turn causes EF to&nbsp; translate the expression using the SQL CharIndex method.&nbsp; <div>&nbsp;</div><div>To avoid unexpected results when the filter is empty you can disable the option.&nbsp; When the filter is not empty you may&nbsp;want the option enabled, depending on your database.&nbsp; </div><div>&nbsp;</div><div>var pd = PredicateBuilder.Make(typeof(T), filterBoxRow.FieldName, FilterOperator.Contains, filterBoxRow.GetFilterFrom())); <br>pd.IgnoreCase = false;<br>predicates.Add(pd);</div>]]>
   </description>
   <pubDate>Mon, 18 Mar 2013 16:00:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4032&amp;PID=16051#16051</guid>
  </item> 
  <item>
   <title>2010-&gt;2012 query generation issue : Hi katit,  I was able to verify...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4032&amp;PID=16014#16014</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 4032<br /><strong>Posted:</strong> 14-Mar-2013 at 10:13am<br /><br />Hi katit,<br /><br />I was able to verify the behavior.<br />I'm filing a bug report and will let you know once we have it fixed.<br /><br />sbelini.]]>
   </description>
   <pubDate>Thu, 14 Mar 2013 10:13:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4032&amp;PID=16014#16014</guid>
  </item> 
  <item>
   <title>2010-&gt;2012 query generation issue : I had code like this:  case Fi...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4032&amp;PID=15985#15985</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1264" rel="nofollow">katit</a><br /><strong>Subject:</strong> 4032<br /><strong>Posted:</strong> 12-Mar-2013 at 8:38pm<br /><br />I had code like this:<br /><br />case FilterChoice.Contains:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;predicates.Add(PredicateBuilder.Make(typeof(T), filterBoxRow.FieldName, FilterOperator.Contains, filterBoxRow.GetFilterFrom()));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br /><br />Basically, I'm building filter manually. If there is empty string it generates WHERE statement like this:<br /><br />WHERE ( CAST(CHARINDEX(LOWER(N''), LOWER(&#091;Extent1&#093;.&#091;UserName&#093;)) AS int)) &gt; 0<br /><br />And it effectively filter's out whole thing.. I think it should do "LIKE '%%'" ?]]>
   </description>
   <pubDate>Tue, 12 Mar 2013 20:38:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4032&amp;PID=15985#15985</guid>
  </item> 
 </channel>
</rss>