<?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 : Question on converting EntityList to List</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Question on converting EntityList to List</description>
  <pubDate>Sat, 11 Apr 2026 09:40:12 -700</pubDate>
  <lastBuildDate>Thu, 12 Jul 2007 15:44:10 -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=209</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>Question on converting EntityList to List : You must use List, not EntityList. Try...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=209&amp;PID=459#459</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=21" rel="nofollow">IdeaBlade</a><br /><strong>Subject:</strong> 209<br /><strong>Posted:</strong> 12-Jul-2007 at 3:44pm<br /><br /><P>You must use List, not EntityList.</P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Try using a List&lt;PayrollTrxLines&gt; instead of an EntityList&lt;PayrollTrxLines&gt; as in this example from Reference Help<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">PersistenceManager</SPAN> pm = <SPAN style="COLOR: #2b91af">PersistenceManager</SPAN>.DefaultManager; <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Retrieve all customers. <o:p></o:p></SPAN></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">EntityList</SPAN>&lt;<SPAN style="COLOR: #2b91af">Customer</SPAN>&gt; allCustomers = pm.GetEntities&lt;<SPAN style="COLOR: #2b91af">Customer</SPAN>&gt;(); <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>System.Diagnostics.<SPAN style="COLOR: #2b91af">Debug</SPAN>.WriteLine(allCustomers.Count.ToString()); <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Define find criteria - this looks for companies beginning with letter 'A'. <o:p></o:p></SPAN></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Predicate</SPAN>&lt;<SPAN style="COLOR: #2b91af">Customer</SPAN>&gt; filter = <SPAN style="COLOR: blue">delegate</SPAN>(<SPAN style="COLOR: #2b91af">Customer</SPAN> pCustomer) { <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> pCustomer.CompanyName.StartsWith(<SPAN style="COLOR: #a31515">"A"</SPAN>); <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}; <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Find a subset of customers. <o:p></o:p></SPAN></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">List</SPAN>&lt;<SPAN style="COLOR: #2b91af">Customer</SPAN>&gt; AListCustomers = allCustomers.FindAll(filter); <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Console</SPAN>.WriteLine(AListCustomers.Count.ToString()); <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 12 Jul 2007 15:44:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=209&amp;PID=459#459</guid>
  </item> 
  <item>
   <title>Question on converting EntityList to List : I would just like to ask if converting...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=209&amp;PID=458#458</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=20" rel="nofollow">Customer</a><br /><strong>Subject:</strong> 209<br /><strong>Posted:</strong> 12-Jul-2007 at 3:43pm<br /><br /><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">I would just like to ask if converting from System.Collections.IList to IdeaBlade.Persistence.EntityList? Because I’m having problems when filtering records using the FindAll method of Entitylist that returns an IList object. Is it possible to return an EntityList object instead of the IList??<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">Here is the method where I need to convert to EntityList. <o:p></o:p></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">public</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: #2b91af">EntityList</SPAN>&lt;GSC.Entities.<SPAN style="COLOR: #2b91af">PayrollTrxLines</SPAN>&gt; GetPayrollTrxLinesByEmployee(<SPAN style="COLOR: blue">string</SPAN> code, <SPAN style="COLOR: #2b91af">EntityList</SPAN>&lt;GSC.Entities.<SPAN style="COLOR: #2b91af">PayrollTrxLines</SPAN>&gt; AlltrxLines)<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: #2b91af">Predicate</SPAN>&lt;<SPAN style="COLOR: #2b91af">PayrollTrxLines</SPAN>&gt; filter = <SPAN style="COLOR: blue">delegate</SPAN>(GSC.Entities.<SPAN style="COLOR: #2b91af">PayrollTrxLines</SPAN> attribute)<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">if</SPAN> (attribute.EmployeeCode != <SPAN style="COLOR: blue">null<o:p></o:p></SPAN></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; attribute.EmployeeCode.Equals(code))<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Collections.Generic.<SPAN style="COLOR: #2b91af">List</SPAN>&lt;GSC.Entities.<SPAN style="COLOR: #2b91af">PayrollTrxLines</SPAN>&gt; filterObj = AlltrxLines.FindAll(filter);<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">if</SPAN> (filterObj.Count &gt; 0)<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B><SPAN style="COLOR: red">return filterObj as EntityList&lt;GSC.Entities.PayrollTrxLines&gt;;<o:p></o:p></SPAN></B></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: blue">null</SPAN>;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P>]]>
   </description>
   <pubDate>Thu, 12 Jul 2007 15:43:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=209&amp;PID=458#458</guid>
  </item> 
 </channel>
</rss>