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:
privatevoid 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:
privatevoid OnDeleteSessionConfirmDialogClosed(IMessageBox messageBox)
{
if (messageBox.WasSelected(MessageBoxButtons.Yes))
{
Model.SessionList.Remove(Session);
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