private void OnSongUpdated(SongAddAndDetailViewModel source, Song song) { var songInList = Songs.Single(s => s.Id == song.Id); songInList.Id = song.Id; songInList.Artist = song.Artist; songInList.Title = song.Title; songInList.Text = song.Text; songInList.Chords = song.Chords; }
private void OnSongDeleted(SongAddAndDetailViewModel source, Song song) { Songs.Remove(Songs.Where(s => s.Id == song.Id).Single()); OnPropertyChanged(nameof(Songs)); }
private void OnSongAdded(SongAddAndDetailViewModel source, Song song) { Songs.Add(new SongViewModel(song)); }