Ejemplo n.º 1
0
 private async Task Init()
 {
     using (var db = new FitAndGymDataContext(DBConnectionString))
     {
         db.Log = new Utilities.DebugTextWriter();
         if (db.DatabaseExists() == false)
         {
             db.CreateDatabase();
             db.SubmitChanges();
         }
     }
     await App.FitAndGymViewModel.LoadTrainingDaysCollectionFromDatabase();
     await App.FitAndGymViewModel.LoadExercisesCollectionFromDatabase();
 }
Ejemplo n.º 2
0
 public FitAndGymViewModel() { } // to fulfill Design-Time data access requirements
 public FitAndGymViewModel(string fitAndGymConnectionString)
 {
     db = new FitAndGymDataContext(fitAndGymConnectionString);
     db.Log = new Utilities.DebugTextWriter();
 }