crazylittlemonkeys wrote:
I have an Entity with a child collection. What I need to do is be able to delete any entity in the collection and do any updates within one transaction. This is using self servicing code. Can anyone tell me how to do this?
If you want to delete all entities in teh collection, which updates do you want to perform as well? The entity which contains the child collection?
You can use a UnitOfWork object: add the entity to the unit of work object for save, then add the child collection for delete. Then commit the unitofwork, it then first does the updates (or first the inserts, then the updates) and after that the deletes, in one transaction.