Child Collection Delete

Child Collection Delete

Old forum URL: forums.lhotka.net/forums/t/11440.aspx


tanny posted on Thursday, June 28, 2012

All,

I have parent - child class relationship and there is sceanrio where I need to delete all child objects only (through referential integrity). Can someone please assist on this regard as I'm new to CSLA and trying to understand the basics?

It would be great help to me if I can get some samples on how delete works in parent child relationship.

 

Regards,

Tanny

RockfordLhotka replied on Saturday, June 30, 2012

As you probably know, CSLA is not an ORM. It is a framework that helps you create powerful IN-MEMORY business objects.

When you delete a child from a BusinessListBase collection, the object is moved to a DeletedList collection inside the main collection. When the collection is saved, your DAL is invoked to delete the items in the DeletedList, and then to insert/update any changed items in the main list.

Copyright (c) Marimer LLC