Log in


   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Recursive delete logic?

Pages: 1
LLBLGen Pro Runtime Framework
Recursive delete logic?

  Print all messages in this thread  
Poster Message


Joined on:
22-Oct-2007 18:47:51
33 posts
# Posted on: 03-Mar-2008 00:44:14.  
I'm looking for an elegant way to peform a recursive delete based off the deleted entities contained in the Collection's removed entity tracker. The recursive save is wonderful because you can place that logic at a base form and it handles all the ordering etc for you and I'm looking for a similar solution to deal with the deleted entities.

I guess the removedentitytracker on the collection is relatively new as there's no obvious way I've found to pull the removed entities out of the entity graph in a similar way that the ObjectGraphUtils can grab all of the inserted and updated ones out. I wrote some really ugly code to try to handle the situation but it seems like there should be an easier way to do it.

I guess what I'm looking for is a method that I can pass an entitycollection to that will return a distinct list of all the deleted entities in the entire graph so that they can be passed to a UnitOfWork2 and commited along with the normal recursive save tasks. It would also be nice to have a similar technique to be able to clear the removedentitytrackers in the graph after a successful commit. I'm hoping I'm missing a class somewhere in the framework or there's a smart way to utilize the objectgraphutils to achieve this goal.

Thanks in advance...
Support Team

Guatemala City
Joined on:
28-Nov-2005 23:35:24
8148 posts
# Posted on: 03-Mar-2008 04:52:18.  
There isn't a direct public _method_ provided by LLBLGen. Please read some implementations at the forum. For example: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=9692

David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
Pages: 1  

Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.