<?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 : Basic Projections</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Basic Projections</description>
  <pubDate>Tue, 21 Apr 2026 14:08:40 -700</pubDate>
  <lastBuildDate>Tue, 06 Jul 2010 13:15:19 -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=1942</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>Basic Projections : That would be great!  I have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7526#7526</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=836" rel="nofollow">jkowalski</a><br /><strong>Subject:</strong> 1942<br /><strong>Posted:</strong> 06-Jul-2010 at 1:15pm<br /><br />That would be great!<DIV>&nbsp;</DIV><DIV>I have another work around.</DIV><DIV>&nbsp;</DIV><DIV>Projecting into a known type:</DIV><DIV>&nbsp;</DIV><DIV>On the Server:</DIV><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">&#091;<SPAN style="COLOR: #2b91af">DataContract</SPAN>&#093; <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">partial</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: #2b91af">Account</SPAN> : <SPAN style="COLOR: #2b91af">IKnownType</SPAN><o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">{<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">&nbsp;&nbsp;&nbsp; &#091;<SPAN style="COLOR: #2b91af">DataMember</SPAN>&#093; <SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">string</SPAN> AccountName { <SPAN style="COLOR: blue">get</SPAN>; <SPAN style="COLOR: blue">set</SPAN>; }<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&#091;<SPAN style="COLOR: #2b91af">DataMember</SPAN>&#093; <SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">string</SPAN> AccountType { <SPAN style="COLOR: blue">get</SPAN>; <SPAN style="COLOR: blue">set</SPAN>; }<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&#091;<SPAN style="COLOR: #2b91af">DataMember</SPAN>&#093; <SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">string</SPAN> EmailAddress { <SPAN style="COLOR: blue">get</SPAN>; <SPAN style="COLOR: blue">set</SPAN>; }<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">}</P><DIV>&nbsp;</DIV><DIV>On The Client</DIV><DIV><o:p><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">public</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"> <SPAN style="COLOR: #2b91af">EntityQuery</SPAN> GetQuery()<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">{<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">var</SPAN> query = <SPAN style="COLOR: #2b91af">Globals</SPAN>.SMEntityManger.SM_Accounts<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>.Where(e =&gt; e.AccountName.StartsWith(<SPAN style="COLOR: #a31515">"a"</SPAN>))<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>.Select(e =&gt; <SPAN style="COLOR: blue">new</SPAN> Trident.Server.View.<SPAN style="COLOR: #2b91af">Account</SPAN> { AccountName = e.AccountName, </P><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AccountType =&nbsp;e.AccountType });<o:p></o:p></SPAN></DIV><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><o:p></o:p></SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="COLOR: blue">&nbsp;&nbsp;&nbsp; return</SPAN> (<SPAN style="COLOR: #2b91af">EntityQuery</SPAN>)query;<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">}<o:p></o:p></SPAN></P></o:p></SPAN></DIV><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><o:p><FONT size=3 face="Times New Roman">&nbsp;</FONT></o:p></P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><o:p><FONT size=3 face="Times New Roman"></FONT></o:p>&nbsp;</P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><o:p><FONT size=3 face="Times New Roman">I will keep my hears open for the changes. </FONT></o:p></P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><o:p><FONT size=3 face="Times New Roman"></FONT></o:p>&nbsp;</P><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><o:p><FONT size=3 face="Times New Roman">Thanks!</FONT></o:p></P><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 06 Jul 2010 13:15:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7526#7526</guid>
  </item> 
  <item>
   <title>Basic Projections : Projections are supported everywhere...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7524#7524</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> 1942<br /><strong>Posted:</strong> 06-Jul-2010 at 1:04pm<br /><br />Projections are supported everywhere within DevForce except the EntityQueryPagedCollectionView.&nbsp; <DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>The only workaround when using the EntityQueryPagedCollectionView is the one I mentioned.&nbsp;&nbsp; We will look at the possibility of fixing this in the next release, due later this month.</DIV>]]>
   </description>
   <pubDate>Tue, 06 Jul 2010 13:04:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7524#7524</guid>
  </item> 
  <item>
   <title>Basic Projections : WHAT!?  One of the main reasons...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7523#7523</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=836" rel="nofollow">jkowalski</a><br /><strong>Subject:</strong> 1942<br /><strong>Posted:</strong> 06-Jul-2010 at 12:31pm<br /><br />WHAT!?<DIV>&nbsp;</DIV><DIV>One of the main reasons that we are looking at you guys is the ability to get only the data we need, and control that request on grid population&nbsp;with user settings (users can chose the columnes they want displayed).</DIV><DIV>&nbsp;</DIV><DIV>Is there a work around here?</DIV><DIV>&nbsp;</DIV><DIV>Thanks.</DIV>]]>
   </description>
   <pubDate>Tue, 06 Jul 2010 12:31:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7523#7523</guid>
  </item> 
  <item>
   <title>Basic Projections : I&amp;#039;m afraid that the EntityQueryPagedCollectionView...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7521#7521</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> 1942<br /><strong>Posted:</strong> 06-Jul-2010 at 12:24pm<br /><br />I'm afraid that the EntityQueryPagedCollectionView doesn't currently support anonymous types.&nbsp;&nbsp; This problem was identified in DevForce 2009, but not yet fixed either there or in DevForce 2010.&nbsp; We will be making some major changes to the EntityQueryPagedCollectionView and ObjectDataSource in a later release this year.&nbsp; Until then, the workaround is to stick with queries returning an entity type.]]>
   </description>
   <pubDate>Tue, 06 Jul 2010 12:24:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7521#7521</guid>
  </item> 
  <item>
   <title>Basic Projections : I must be missing something silly...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7520#7520</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=836" rel="nofollow">jkowalski</a><br /><strong>Subject:</strong> 1942<br /><strong>Posted:</strong> 06-Jul-2010 at 9:30am<br /><br /><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><FONT face="Times New Roman">I must be missing something silly here. We are new to projections and&nbsp;LINQ.</P><DIV>&nbsp;</DIV><DIV>I’m trying to execute a Query in the <SPAN style="mso-spacerun: yes">&nbsp;</SPAN></FONT></FONT><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: #2b91af; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">EntityQueryPagedCollectionView </SPAN><FONT size=3 face="Times New Roman">class. I’m using this object as a DataContext for the DataGrid and the DataPager. When I use a query directly from the EntityManager all is well. However, when I try to use a projection all hell breaks lose.&nbsp;<SPAN style="COLOR: black; mso-ansi-: EN" lang=EN>I have tried structuring the Query in&nbsp;many ways. From some of the limited information I found about this on the forum, here is my latest attempt.</SPAN></DIV></FONT><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P><FONT size=3 face="Times New Roman"></FONT></O:P>&nbsp;</P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">public</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"> <SPAN style="COLOR: blue">void</SPAN> RefreshData()<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="COLOR: #2b91af">&nbsp;&nbsp;&nbsp; EntityQueryPagedCollectionView</SPAN> pcv = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">EntityQueryPagedCollectionView</SPAN>(<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>GetQuery(),<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Source of data</SPAN><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>pgr.PageSize,<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Page size</SPAN><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>pgr.PageSize,<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Load size - no lookahead caching here </SPAN><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">true</SPAN>,<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Whether to defer the load</SPAN><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">false</SPAN>);<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Whether to add primary key to sort columns</SPAN><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><O:P>&nbsp;&nbsp;&nbsp; ^^^^<FONT color=#990033><strong>ERROR OCCURES AT CONSTRUCTOR^^^^^</strong></FONT></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><O:P></O:P></SPAN>&nbsp;</P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>pcv.SortDescriptions.Add(<SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">SortDescription</SPAN>(<SPAN style="COLOR: #a31515">"AccountName"</SPAN>, <SPAN style="COLOR: #2b91af">ListSortDirection</SPAN>.Ascending));<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>pcv.Refresh();<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><O:P>&nbsp;&nbsp;&nbsp; </O:P></SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">DataContext = pcv;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">}<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><O:P><FONT size=3 face="Times New Roman"></FONT></O:P>&nbsp;</P><O:P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">public</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"> <SPAN style="COLOR: #2b91af">EntityQuery</SPAN> GetQuery()<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">{<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="COLOR: blue">&nbsp;&nbsp;&nbsp; var</SPAN> query = <SPAN style="COLOR: #2b91af">Globals</SPAN>.SMEntityManger.SM_Accounts <FONT color=#009933>//The EntityManger lives as a global static object</FONT></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>.Where(e =&gt; e.AccountName.StartsWith(<SPAN style="COLOR: #a31515">"a"</SPAN>))<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>.Select(e =&gt; <SPAN style="COLOR: blue">new</SPAN> {e.AccountName, e.AccountType}); <FONT color=#009933>//Atempting projection<O:P></O:P></FONT></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><O:P>&nbsp;&nbsp;&nbsp; </O:P></SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas"><SPAN style="COLOR: blue">return</SPAN> (<SPAN style="COLOR: #2b91af">EntityQuery</SPAN>)query;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas">}</P><DIV>&nbsp;</DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV><O:P><FONT size=3 face="Times New Roman">GENERATES: <FONT color=#990033>{System.MethodAccessException: Attempt by method 'IdeaBlade.Core.TypeFns.ConstructGenericInstance(System.Type, System.Type&#091;&#093;)' to access method 'System.Collections.Generic.List`1&lt;System.__Canon&gt;..ctor()' failed...</FONT></FONT></O:P></DIV><DIV><O:P><FONT color=#990033 size=3 face="Times New Roman"></FONT></O:P>&nbsp;</DIV><DIV><O:P><FONT color=#990033 size=3 face="Times New Roman"></FONT></O:P>&nbsp;</DIV><DIV><O:P><FONT color=#000000 size=3 face="Times New Roman"><P style="MARGIN: 0in 1pt 0pt" ="Ms&#111;normal"><SPAN style="COLOR: black; mso-ansi-: EN" lang=EN>Please help! This has been troubling us for 2 days. And I'm totally open to best practice. I’m sure you guys do this all the time.</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 9.5pt; mso-bidi-font-family: C&#111;nsolas; mso-ansi-: EN" lang=EN><O:P></O:P></SPAN></P></FONT></O:P></DIV><O:P></O:P></SPAN></O:P><span style="font-size:10px"><br /><br />Edited by jkowalski - 06-Jul-2010 at 9:33am</span>]]>
   </description>
   <pubDate>Tue, 06 Jul 2010 09:30:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1942&amp;PID=7520#7520</guid>
  </item> 
 </channel>
</rss>