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