The simplest way would be pre-loading all dependent objects and then deleting.
You could also have it executed on the server (i.e. calling InvokeServerMethod).
The example in the post you mentioned still works on DevForce2010 (only a slight minor change needed - AsyncCompletedCallback<> is not present in DevForce2010):
AsyncSerialTask.Create<Customer>("DeleteCustomer")
.AddAsyncAction<AsyncEventArgs>(SetupDeletion)
.AddAction(args => DoDelete((Customer)args.UserState))
.Execute(aCustomerToBeDeleted);
private void SetupDeletion(Customer cust, Action<AsyncEventArgs> callback) {
var list = cust.Orders;
bool isPending = list.IsPendingEntityList;
if (isPending) {
list.PendingEntityListResolved += (o, args) => {
callback(new AsyncEventArgs(cust));
};
} else {
callback(new AsyncEventArgs(cust));
}
}
private void DoDelete(Customer cust) {
cust.EntityAspect.Delete();
foreach (var order in cust.Orders.ToList()) {
order.EntityAspect.Delete();
}
}