<?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 : Removing DynamicEntities from cache</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Removing DynamicEntities from cache</description>
  <pubDate>Tue, 14 Apr 2026 03:05:28 -700</pubDate>
  <lastBuildDate>Thu, 12 Jul 2007 15:45:29 -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=210</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>Removing DynamicEntities from cache :  Try this:   foreach (EntityTypeInfo...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=210&amp;PID=461#461</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> 210<br /><strong>Posted:</strong> 12-Jul-2007 at 3:45pm<br /><br /><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;<P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">Try this:<?: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"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: teal">EntityTypeInfo</SPAN> eti <SPAN style="COLOR: blue">in</SPAN> <SPAN style="COLOR: teal">EntityTypeInfo</SPAN>.GetAllDynamicTypes()) {<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">if</SPAN> (<SPAN style="COLOR: blue">typeof</SPAN>(<SPAN style="COLOR: teal">DynamicEntity</SPAN>).IsAssignableFrom(eti.EntityType) &amp;&amp; (eti.DataSourceExtension == <SPAN style="COLOR: blue">this</SPAN>.mPm1.DataSourceExtension)) {<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">this</SPAN>.mPm1.RemoveEntities(eti.EntityType, <SPAN style="COLOR: teal">DataRowState</SPAN>.Unchanged);<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></FONT></SPAN></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">The EntityTypeInfoGetAllDynamicTypes method is unfortunately misnamed – it will return all known entity types, and also returns everything for all known data source extensions. &nbsp;(I might enter a defect report to fix this.)&nbsp; Anyway, if you then filter out actual dynamic types for your data source extension, you can then do the RemoveEntities call. &nbsp;Note that the dynamic entity type still exists, and its entity table is still in the PM. &nbsp;Also note that removing entities with this overload, even if dynamic, causes the query cache to be cleared.&nbsp; If this behavior isn’t wanted, you’d have to first retrieve the entities, and then use the RemoveEntities(list, bool) overload.<o:p></o:p></FONT></FONT></P></SPAN>]]>
   </description>
   <pubDate>Thu, 12 Jul 2007 15:45:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=210&amp;PID=461#461</guid>
  </item> 
  <item>
   <title>Removing DynamicEntities from cache : I would like to know how I could...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=210&amp;PID=460#460</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> 210<br /><strong>Posted:</strong> 12-Jul-2007 at 3:44pm<br /><br /><P =Ms&#111;normal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I would like to know how I could clear from the cache all DynamicEntity instances.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">We’re using PersistanceManager.RemoveEntities(type, datarowstate).</SPAN></FONT></P>]]>
   </description>
   <pubDate>Thu, 12 Jul 2007 15:44:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=210&amp;PID=460#460</guid>
  </item> 
 </channel>
</rss>