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(); }
public FitAndGymViewModel() { } // to fulfill Design-Time data access requirements public FitAndGymViewModel(string fitAndGymConnectionString) { db = new FitAndGymDataContext(fitAndGymConnectionString); db.Log = new Utilities.DebugTextWriter(); }