public MainViewModel(Database db)
 {
     this.Items = new ObservableCollection<ItemViewModel>();
     Recents = new ObservableCollection<ItemViewModel>();
     this.dbase = db;
     yeardata = dbase.QueryYearRanges();
 }
 // Code to execute when the application is launching (eg, from Start)
 // This code will not execute when the application is reactivated
 private void Application_Launching(object sender, LaunchingEventArgs e)
 {
     if (db == null) {
         db = new Database();
     }
 }
 public ArticleModel(Database db)
 {
     this.dbase = db;
     this.Items = new ObservableCollection<ItemViewModel>();
 }