Hi Rocky,
Looking at BusinessBindingListBase<T,C> we can find DataPortal_Delete as follows
protected virtual void DataPortal_Delete(object criteria)
Member of Csla.BusinessBindingListBase<T,C>
Summary:
Override this method to allow immediate deletion of a business object.
Parameters:
criteria: An object containing criteria values to identify the object.
Note BusinessListBase<T,C> doesn't include this method.
1) On p. 52 of Using CSLA4 - Data Access ebook DataPortal_Delete is referred as used on an Editable Root object.
2) I can find only one example of DataPortal_Delete being used in a *ListBase collection:
On EncapsulatedInvoke solution, the class SkillEditList has a DataPortal_Delete method but it's commented.
3) I feel a bit confused as I always thought it wasn't used in collections. Does the DataPortal use the Delete method on collections?
Hi,
A <list>.Save() will only ever call DataPortal_Update or <objectFactory>.Update.
But a DataPortal will call the BO with the "verb" that you typically use in a "static factory method".
So for example your code may call DataPortal.Delete<listType>(criteria) on a list object that will look for a DataPortal_Delete or <objectFactory>.Delete method on the data access side. And DataPortal.Fetch<T> or DataPortal.Create<T> acts similar.
Hi Jonny,
After the original post I noticed p. 122 of Using CSLA4 - Data Access ebook refers DataPortal_Delete being used by an Editable Root List.
DataPortal.Delete<List>(crit)
This triggers a call to
private void DataPortal_Delete(Criteria crit)
This means the Editable Root List will delete itself according to crit criteria.
I have only one remaining question: does it also work on Editable Child List? If I call
DataPortal.DeleteChild<List>(crit)
will this triggers a call to
private void Child_Delete(Criteria crit)
Hi,
DataPortal do not have a DeleteChild method.
Copyright (c) Marimer LLC