<?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 : QueryFilters</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : QueryFilters</description>
  <pubDate>Sat, 11 Apr 2026 20:41:30 -700</pubDate>
  <lastBuildDate>Mon, 15 Nov 2010 09:06:37 -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=2290</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>QueryFilters : Hi Guillermo,   I apologize...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9114#9114</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> 2290<br /><strong>Posted:</strong> 15-Nov-2010 at 9:06am<br /><br />Hi Guillermo, <DIV>&nbsp;</DIV><DIV>I apologize for the mix-up.</DIV><DIV>&nbsp;</DIV><DIV>The overload for AddFilter I suggested&nbsp;will be available with the release of DevForce2010 6.0.7.</DIV><DIV><SPAN style="FONT-FAMILY: 'Calibri', 'sans-serif'; FONT-SIZE: 11pt; 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: 'Calibri', 'sans-serif'; FONT-SIZE: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">&nbsp;&nbsp; sbelini.</SPAN></DIV>]]>
   </description>
   <pubDate>Mon, 15 Nov 2010 09:06:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9114#9114</guid>
  </item> 
  <item>
   <title>QueryFilters :   Hi, Silvio.I cannot find the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9109#9109</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=825" rel="nofollow">gkneo</a><br /><strong>Subject:</strong> 2290<br /><strong>Posted:</strong> 15-Nov-2010 at 1:16am<br /><br /><div style="margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; ">Hi, Silvio.<div><br></div><div>I cannot find the method:</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">public void AddFilter(IdeaBlade.Linq.IPredicateDescription pd, bool canReplaceIfAlreadyExists = false);</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "></pre></td></tr></table></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">The only available method is :</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 0px; -webkit-border-vertical-spacing: 0px; "><table width="99%"><tr><td><pre class="BBcode"></span></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 0px; -webkit-border-vertical-spacing: 0px; "></span></span><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><pre style="font-family: c&#111;nsolas; display: inline !imant; "><span style="color: blue; ">public</span>&nbsp;<span style="color: blue; ">void</span>&nbsp;AddFilter&lt;T&gt;(Func&lt;IQueryable&lt;T&gt;,&nbsp;IQueryable&lt;T&gt;&gt;&nbsp;transformFunc)&nbsp;<span style="color: blue; ">where</span>&nbsp;T&nbsp;:&nbsp;<span style="color: blue; ">class</span>;</pre></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><pre style="font-family: c&#111;nsolas; "><span ="apple-style-span"="" style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; "></pre></td></tr></table></span></pre></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><pre style="font-family: c&#111;nsolas; display: inline !imant; "><span ="apple-style-span"="" style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; "><br></span></pre><pre style="font-family: c&#111;nsolas; display: inline !imant; "><span ="apple-style-span"="" style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; ">I am using Devforce 2010 6.0.6</span></pre></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><pre style="font-family: c&#111;nsolas; display: inline !imant; "><span ="apple-style-span"="" style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; ">Regards,</span></pre></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><pre style="font-family: c&#111;nsolas; display: inline !imant; "><span ="apple-style-span"="" style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; "><br></span></pre></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><pre style="font-family: c&#111;nsolas; "><span ="apple-style-span"="" style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; ">Guillermo</span></pre></span></div></div><span style="font-size:10px"><br /><br />Edited by gkneo - 15-Nov-2010 at 1:18am</span>]]>
   </description>
   <pubDate>Mon, 15 Nov 2010 01:16:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9109#9109</guid>
  </item> 
  <item>
   <title>QueryFilters : Hi Guillermo,  try  public...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9080#9080</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> 2290<br /><strong>Posted:</strong> 11-Nov-2010 at 11:51am<br /><br />Hi Guillermo,<DIV>&nbsp;</DIV><DIV>try </DIV><DIV><strong>public void AddFilter(IdeaBlade.Linq.IPredicateDescription pd, bool canReplaceIfAlreadyExists = false); </strong></DIV><DIV>instead:</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas></FONT></FONT></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> list = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>this</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.EntityManager.MetadataStore.GetEntityTypes();</DIV><DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; foreach</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (</FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> item </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>in</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> list) {</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> meta = IdeaBlade.EntityModel.</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityMetadataStore</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.Instance.GetEntityMetadata(item);</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> dp = meta.DataProperties&#091;</FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"Id_Parent"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#093;;</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp; if</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (dp != </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>) {</DIV><DIV></FONT></FONT><FONT color=#008000 size=2 face=C&#111;nsolas><FONT color=#008000 size=2 face=C&#111;nsolas><FONT color=#008000 size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //this.QueryFilters.AddFilter ?????????????</DIV><DIV></FONT></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> filter = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>PredicateDescription</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>(item, </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"Id_Parent"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>FilterOperator</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.IsEqualTo, 1);</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.QueryFilters.AddFilter(filter);</DIV><DIV>&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp; }</FONT></FONT></FONT></FONT></DIV></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></FONT></FONT>&nbsp;</DIV><DIV><FONT face=C&#111;nsolas><FONT face=C&#111;nsolas><FONT size=2 face=Verdana>Regards,</FONT></FONT></FONT></DIV><DIV><FONT face=C&#111;nsolas><FONT face=C&#111;nsolas><FONT size=2 face=Verdana>&nbsp;&nbsp; Silvio.</FONT></DIV></FONT></FONT>]]>
   </description>
   <pubDate>Thu, 11 Nov 2010 11:51:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9080#9080</guid>
  </item> 
  <item>
   <title>QueryFilters : Is it possible to get only the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9071#9071</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=825" rel="nofollow">gkneo</a><br /><strong>Subject:</strong> 2290<br /><strong>Posted:</strong> 11-Nov-2010 at 12:04am<br /><br />Is it possible to get only the entity types involved in the query? &nbsp;<div><br></div><div>I have tried your suggestion but I don't know how to use method AddFilter dynamically as it expects a concrete Entity &nbsp;type as T.</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><pre style="font-family: c&#111;nsolas"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue">var</span>&nbsp;list&nbsp;=&nbsp;<span style="color: blue">this</span>.EntityManager.MetadataStore.GetEntityTypes();<br> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue">foreach</span>&nbsp;(<span style="color: blue">var</span>&nbsp;item&nbsp;<span style="color: blue">in</span>&nbsp;list)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue">var</span>&nbsp;meta=&nbsp;IdeaBlade.EntityModel.<span style="color: #2b91af">EntityMetadataStore</span>.Instance.GetEntityMetadata(item);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue">var</span>&nbsp;dp&nbsp;=&nbsp;meta.DataProperties&#091;<span style="color: #a31515">"Id_Parent"</span>&#093;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue">if</span>&nbsp;(dp&nbsp;!=&nbsp;<span style="color: blue">null</span>)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue">this</span>.QueryFilters.AddFilter&nbsp;<font ="Apple-style-span" color="#FF0000">?????????????</font><br> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</pre></div><div><br></div><div><br></div><div></pre></td></tr></table><br><div><br></div><div><br></div></div><div>Guillermo</div>]]>
   </description>
   <pubDate>Thu, 11 Nov 2010 00:04:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9071#9071</guid>
  </item> 
  <item>
   <title>QueryFilters : Hi gkneo,   To avoid adding...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9066#9066</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> 2290<br /><strong>Posted:</strong> 10-Nov-2010 at 3:12pm<br /><br />Hi gkneo, <DIV>&nbsp;</DIV><DIV>To avoid adding each filter manually, you can use the metadataStore to get a collection of all entity types and add filters for each one that has idParent.</DIV><DIV>&nbsp;</DIV><DIV>As for performance, there won't be a negative impact performant because the EntityQueryFilterCollection (i.e. QueryFilters)&nbsp;is implemented as a hash map. (and therefore the number of filters in the collection does not significantly affect performance)</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;&nbsp; Silvio.</DIV>]]>
   </description>
   <pubDate>Wed, 10 Nov 2010 15:12:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9066#9066</guid>
  </item> 
  <item>
   <title>QueryFilters : Hi.I have like 50 entities in...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9055#9055</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=825" rel="nofollow">gkneo</a><br /><strong>Subject:</strong> 2290<br /><strong>Posted:</strong> 10-Nov-2010 at 1:44am<br /><br />Hi.<div><br></div><div>I have like 50 entities &nbsp;in my model and the 30 of them have the same property : Id_Parent (Just the same name and type, they are not inheriting from a base entity)</div><div><br></div><div>All queries must have this property included in the Where clause. &nbsp;In order to avoid developers from forgetting to include this property in their queries, I am using a custom&nbsp;<span ="Apple-style-span" style="font-family: c&#111;nsolas; color: rgb43, 145, 175; white-space: pre; ">EntityServerQueryInterceptor.  <span ="Apple-style-span" style="color: rgb0, 0, 0; font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; ">So, for my 30 entities &nbsp;I have in my interceptor:&nbsp;</span></span></div><div><span ="Apple-style-span" style="font-family: c&#111;nsolas; color: rgb43, 145, 175; white-space: pre; "><span ="Apple-style-span" style="color: rgb0, 0, 0; font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; "><table width="99%"><tr><td><pre class="BBcode"></span></span></div><div><span ="Apple-style-span" style="font-family: c&#111;nsolas; color: rgb43, 145, 175; white-space: pre; "><span ="Apple-style-span" style="color: rgb0, 0, 0; font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; ">int idParent= GetIdParent();</span></span></div><div><span ="Apple-style-span" style="font-family: c&#111;nsolas; color: rgb43, 145, 175; white-space: pre; "><span ="Apple-style-span" style="color: rgb0, 0, 0; font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; "></span></span><span ="Apple-style-span" style="font-family: c&#111;nsolas; white-space: pre; "><span style="color: blue">this</span>.QueryFilters.AddFilter&lt;<span style="color: #2b91af">Entity1</span>&gt;(q&nbsp;=&gt;&nbsp;q.Where(i&nbsp;=&gt;&nbsp;i.Id_Parent==&nbsp;idParent));</span></div><div><span ="Apple-style-span" style="font-family: c&#111;nsolas; white-space: pre; "><span ="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; "><pre style="font-family: c&#111;nsolas; color: rgb0, 0, 0; "><span style="color: blue; ">this</span>.QueryFilters.AddFilter&lt;<span style="color: rgb43, 145, 175; ">Entity2</span>&gt;(q&nbsp;=&gt;&nbsp;q.Where(i&nbsp;=&gt;&nbsp;i.Id_Parent==&nbsp;idParent));</pre><pre style="font-family: c&#111;nsolas; color: rgb0, 0, 0; ">...</pre><pre style="font-family: c&#111;nsolas; color: rgb0, 0, 0; "><span ="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal; "><pre style="font-family: c&#111;nsolas; color: rgb0, 0, 0; "><span style="color: blue; ">this</span>.QueryFilters.AddFilter&lt;<span style="color: rgb43, 145, 175; ">Entity30</span>&gt;(q&nbsp;=&gt;&nbsp;q.Where(i&nbsp;=&gt;&nbsp;i.Id_Parent==&nbsp;idParent));</pre></span></pre></span></span></div><div></pre></td></tr></table></div><div>Is this the best approach? &nbsp; Now, I need to add another 20 entities to my model, and all of them have this property. &nbsp;Do I have to another 20 filters? &nbsp;What about the performance?</div><div><br></div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Wed, 10 Nov 2010 01:44:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2290&amp;PID=9055#9055</guid>
  </item> 
 </channel>
</rss>