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