Beispiel #1
0
 public MainViewModel()
 {
     using (var repository = new MusicRepository())
     {
         MusicGroups = repository.MusicGroups;
     }
 }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     var uniqueId = (int)e.Parameter;
     using (var repository = new MusicRepository())
     {
         viewModel.Songs = repository.MusicGroups.First(m => m.UniqueId.Equals(uniqueId)).Songs.ToList();
     }
 }