DeleteSelf #3440
-
I successfully upgraded from CSLA 4.5.1 to CSLA 7.0 several months ago. However, I recently had occasion to perform a self-delete on a record for the first time and found that there didn't seem to be any way to do it. I see that in 4.5.1 DeleteSelf was designated as protected, whereas in the 7.0 templates and snippets it's shown as private. Is this an error, or is there an alternative way of invoking it in 7.0? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
As of CSLA 5 the data portal no longer relies on specific method names, and instead relies on attributes such as The data portal operation methods do need to be private, and now can have any name you choose. Starting in CSLA 6 and 7 we've been phasing out the backward support for the legacy "DataPortal_XYZ" method names. Eventually the attributes will be the required approach. |
Beta Was this translation helpful? Give feedback.
The rules for how delete and deleteself work are the same as always.
The data portal
Delete
andDeleteAsync
methods invoke the deleteself operation method.When you call
SaveAsync
on a root object, if objects in the graph are marked for deletion then the delete operation method is invoked.