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...