Vibrant discussion about CSLA .NET and using the framework to build great business applications.
When I remove an item from a Dynamic List, Shouldn't the Update be called right away? Here is the code from the View Model:
private void OnDeleteSessionConfirmDialogClosed(IMessageBox messageBox)
{
if (messageBox.WasSelected(MessageBoxButtons.Yes))
Model.SessionList.Remove(Session);
}
I tried to save after it was removed, but the object was marked as busy and I couldn't apply edits:
Session.ApplyEdit();
Session.BeginSave((o, e) =>
if (e.Error != null)
throw e.Error;
});
I don't think I need to do this as the Dynamic List should save automatically...Correct? It does dissappear off the list in the datagrid, but it never disappears from the database...any help would be appreciated! I am using Silverlight 5 with CSLA 4.3 (I believe).
Todd
If I remember correctly, the dynamic root list class only triggers insert/update/delete operations due to data binding behaviors, not arbitrary method calls. In other words, to trigger its automatic behavior through code your code will need to simulate normal datagrid method/event calls.
Rocky