private void Storage_TaskChanged(object sender, ModelChangedEventArgs <TaskRecord> e) { if (sender != this) { switch (e.Action) { case ModelChangedAction.Delete: view.DeleteTask(e.Model); break; case ModelChangedAction.Create: view.AddTask(e.Model); break; case ModelChangedAction.Update: List <TaskRecord> tasksToUpdate = new List <TaskRecord>(); tasksToUpdate.Add(e.Model); view.RefreshTasks(tasksToUpdate); break; } } }