private AllSongs CreateReservation() { var song = App.Model.Songs .Where(i => i.Artist.ToLower() == ArtistName.Text.ToLower()) .FirstOrDefault(); var songName = App.Model.Songs .Where(i => i.Title.ToLower() == SongName.Text.ToLower()) .FirstOrDefault(); if ((song == null) && (songName == null)) { //add a new song if //none exist with that name song = new AllSongs { Artist = ArtistName.Text, Title = SongName.Text, SongSource = SongPath.Text, }; } return(song); }
protected override void OnNavigatedTo(NavigationEventArgs e) { SongInfo = e.Parameter as AllSongs; if (SongInfo == null) { ChangeSource(); } else { OpenMedia(); } }