public ItemDetailViewModel(TrainingEntity item = null) { if (item != null) { Title = item.Text; Item = item; } }
async Task EditItem(TrainingEntity item) { //update //Items.Add(item); await DataStore.UpdateItemAsync(item); }
async Task AddExercise(TrainingEntity item) { await DataStore.UpdateItemAsync(item); }
async Task AddItem(TrainingEntity item) { Items.Add(item); await DataStore.AddItemAsync(item); }