public void AddPlanting(string key, Planting planting) { AddToDictionary(key, planting, Plantings); if (this.ID.Length == 0) { throw new System.Exception($"{typeof(Garden).Name} must be added to {typeof(GardenData).Name} before adding {typeof(Planting).Name}"); } planting.GardenID = ID; }
public void RemovePlanting(Planting planting) { RemFromDictionary(planting, Plantings); }