<?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 : &quot;Where&quot; not showing in IntelliSense</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : &quot;Where&quot; not showing in IntelliSense</description>
  <pubDate>Sat, 11 Apr 2026 13:29:40 -700</pubDate>
  <lastBuildDate>Fri, 23 Apr 2010 00:03:52 -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=1743</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>&quot;Where&quot; not showing in IntelliSense : A customer wrote:  &amp;#034;I tried...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1743&amp;PID=6615#6615</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=482" rel="nofollow">WardBell</a><br /><strong>Subject:</strong> 1743<br /><strong>Posted:</strong> 23-Apr-2010 at 12:03am<br /><br />A customer wrote:<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">"I tried to&nbsp;type the following line</SPAN></DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><DIV><BR><FONT face="Courier New, Courier, mono">_customersQuery =&nbsp;<BR>&nbsp;&nbsp;_customersQuery.<SPAN style=": yellow">Where</SPAN>(c =&gt; c.CompanyName.ToUpper().StartsWith(searchTxt)); </FONT></DIV><DIV>&nbsp;</DIV><DIV>but the "Where" method does not show in IntelliSense and the code will not compile."</SPAN></DIV></BLOCKQUOTE><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">My first thought: he forgot to add "<strong>using IdeaBlade.EntityModel;</strong>" (thats "Imports IdeaBlade.EntityModel" in VB)</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">This omission is almost always the reason that DevForce LINQ extension methods don't appear. Happens to me all of the time.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">Try commenting out this "using" statement on some working code and you'll see what I mean.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">But that wasn't the cause of <strong>his</strong> problem as I quickly discovered when he sent me something like this:</SPAN></DIV><BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><FONT face="Courier New, Courier, mono">using System;<BR><strong>using IdeaBlade.EntityModel;</strong><BR>&nbsp;&nbsp;<BR>namespace WhatIsWrong {</FONT></SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><FONT face="Courier New"></FONT></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><FONT face="Courier New, Courier, mono">&nbsp; public class CantFindWhere {<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; IEntityQuery _customersQuery;<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; public CantFindWhere(string searchTxt) {</FONT></SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var mgr = new NorthwindIBEntities();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _customersQuery = mgr.Customers;</FONT></SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!String.IsNullOrEmpty(searchTxt)) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _customersQuery =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _customersQuery.Where(c =&gt; c.CompanyName.ToUpper().StartsWith(searchTxt));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // more ... but irrelevant</FONT></SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><FONT face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; }<BR>&nbsp; }<BR>}</FONT></SPAN></DIV></BLOCKQUOTE><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">He intends to retrieve every customer ... unless the user enters some search text in which case he extends the query with a restrictive clause limiting the result to customers whose names start with the search text.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">As he said, IntelliSense does not offer the "Where" method&nbsp;after "_customersQuery" and Visual Studio identifes&nbsp;the entire expression,&nbsp;"Where( c =&gt; ...", as something that won't compile.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">You can see that he did remember the IdeaBlade.EntityModel&nbsp;"using" statement.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">Can you spot the problem? It took me awhile.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">Notice that "_customersQuery" is defined as an "IEntityQuery".&nbsp; </SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><strong>There is no "Where" extension method for IEntityQuery.</strong></SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">Check out IdeaBlade.EntityModel.<strong>EntityQueryExtensions</strong> in the VS Object Browser window. That's home for most (if not all) of the DevForce LINQ extension method definitions.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">"Where" is defined as:</SPAN></DIV><BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"><B><FONT size=2><P>Where&lt;TSource&gt;</B>(this </FONT><B><U><FONT color=#0066cc size=2><FONT color=#0066cc size=2>IdeaBlade.EntityModel.IEntityQuery&lt;TSource&gt;</B></U></FONT></FONT><FONT size=2> <I>source</I><B>, </FONT><U><FONT color=#0066cc size=2><FONT color=#0066cc size=2>System.Linq.Expressions.Expression&lt;Func&lt;TSource,int,bool&gt;&gt;</B></U></FONT></FONT><FONT size=2> <I>predicate</I>)</P></FONT></SPAN></DIV></BLOCKQUOTE><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">It extends <strong>IEntityQuery&lt;T&gt;</strong>&nbsp;...&nbsp; &nbsp;IEntityQuery(Of T) if you write in VB.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">If our friend changes his definition of the "_customersQuery" member variable&nbsp;to</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN><FONT size=2 face="Courier New">&nbsp;&nbsp;&nbsp; <strong>IEntityQuery&lt;Customer&gt;</strong> _customersQuery;</FONT><BR></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">the "Where" method becomes available.</SPAN></DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">Happy coding!</SPAN></DIV>]]>
   </description>
   <pubDate>Fri, 23 Apr 2010 00:03:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1743&amp;PID=6615#6615</guid>
  </item> 
 </channel>
</rss>