<?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 : Deleting entities using another collection</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Deleting entities using another collection</description>
  <pubDate>Mon, 13 Jul 2026 13:10:37 -700</pubDate>
  <lastBuildDate>Thu, 26 May 2011 16:44:11 -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=2723</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>Deleting entities using another collection : Hey, Albert just filled me in...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10843#10843</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1097" rel="nofollow">robertg</a><br /><strong>Subject:</strong> 2723<br /><strong>Posted:</strong> 26-May-2011 at 4:44pm<br /><br />Hey, Albert just filled me in a little on your project, and I understand why you'd want to use the original described behavior if it's a big conversion project. It sounds like you have the information you need now, but if there's anything else, please let us know.]]>
   </description>
   <pubDate>Thu, 26 May 2011 16:44:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10843#10843</guid>
  </item> 
  <item>
   <title>Deleting entities using another collection : It&amp;#039;s not quite the same thing......</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10842#10842</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1097" rel="nofollow">robertg</a><br /><strong>Subject:</strong> 2723<br /><strong>Posted:</strong> 26-May-2011 at 4:00pm<br /><br />It's not quite the same thing... if you're extending the entites so that you can use them to track their own state, you never have to worry about having extraneous copies of them, or merging anything. You'd just have one EM, and can thus keep it simple.]]>
   </description>
   <pubDate>Thu, 26 May 2011 16:00:26 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10842#10842</guid>
  </item> 
  <item>
   <title>Deleting entities using another collection : Hmmm...wouldn&amp;#039;t that accomplish...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10841#10841</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1151" rel="nofollow">Randar</a><br /><strong>Subject:</strong> 2723<br /><strong>Posted:</strong> 26-May-2011 at 3:51pm<br /><br />Hmmm...wouldn't that accomplish the same thing as just keeping them in a list?&nbsp; If I had a flag, I would have to keep them around for a while.&nbsp; The problem is the time between the flagging and the call to SaveChanges may be some time apart.&nbsp; I have an entity that was associated with with one EM and trying to delete it a different EM.&nbsp; Are you saying that is possible and happens by default?<br><br>If so, I have to look through my code again and find out why they are not actually being deleted.<br>]]>
   </description>
   <pubDate>Thu, 26 May 2011 15:51:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10841#10841</guid>
  </item> 
  <item>
   <title>Deleting entities using another collection : Randar,   Have you considered...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10840#10840</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1097" rel="nofollow">robertg</a><br /><strong>Subject:</strong> 2723<br /><strong>Posted:</strong> 26-May-2011 at 3:45pm<br /><br />Randar, <DIV>&nbsp;</DIV><DIV>Have you considered adding a property to the entity with a partial class, and using that property to track entities you want to delete? Then, when it's time to save your changes, you can first run a query for that property, and delete each of the entities that match it. It's much more straight-forward than storing information about those entities in another object.</DIV><DIV>&nbsp;</DIV><DIV>-- Robert</DIV>]]>
   </description>
   <pubDate>Thu, 26 May 2011 15:45:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10840#10840</guid>
  </item> 
  <item>
   <title>Deleting entities using another collection : What I&amp;#039;m trying to do is:1)...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10838#10838</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1151" rel="nofollow">Randar</a><br /><strong>Subject:</strong> 2723<br /><strong>Posted:</strong> 26-May-2011 at 3:28pm<br /><br />What I'm trying to do is:<br>1) Keep track of the entities that need to be deleted in a List(Of T As IdeaBlade.EntityModel.Entity)<br>2) When the person actually hits the "save", take that list and actually delete the entities along with a bunch of other data.<br><br>I tried to create a new EntityManager and then take my list of entities and called .EntityAspect.Delete on them.&nbsp; No big surprise, but they didn't get deleted because they originally belonged to a different EM.<br><br>Is there a way I can take those entities and attach them to the new EM and then delete them when I hit SaveChanges?&nbsp; I'm just trying to not re-retrieve them from the server if I can.<br><br>I hope I explained myself well enough.<br><br>In case you ask, there are reasons, that would take a while to explain, but I can't just flag the entity at the time of deletion using .EntityAspect.Delete.&nbsp; I have to keep track of the list.<br>]]>
   </description>
   <pubDate>Thu, 26 May 2011 15:28:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2723&amp;PID=10838#10838</guid>
  </item> 
 </channel>
</rss>