Example #1
0
 public PlantRepository()
 {
     Plants = new List<Plant>();
     PlantDataContext = new PlantDataContext();
     if (!PlantDataContext.DatabaseExists())
         PlantDataContext.CreateDatabase();
 }
Example #2
0
 private void CreatePlantDataContextIfNotExists()
 {
     if (PlantDataContext == null)
         PlantDataContext = new PlantDataContext();
 }