/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (GeospatialAreaImages.Any()) { dependentObjects.Add(typeof(GeospatialAreaImage).Name); } if (GeospatialAreaPerformanceMeasureFixedTargets.Any()) { dependentObjects.Add(typeof(GeospatialAreaPerformanceMeasureFixedTarget).Name); } if (GeospatialAreaPerformanceMeasureNoTargets.Any()) { dependentObjects.Add(typeof(GeospatialAreaPerformanceMeasureNoTarget).Name); } if (GeospatialAreaPerformanceMeasureReportingPeriodTargets.Any()) { dependentObjects.Add(typeof(GeospatialAreaPerformanceMeasureReportingPeriodTarget).Name); } if (NpccSubbasinProvincesWhereYouAreTheSubbasin.Any()) { dependentObjects.Add(typeof(NpccSubbasinProvince).Name); } if (PersonStewardGeospatialAreas.Any()) { dependentObjects.Add(typeof(PersonStewardGeospatialArea).Name); } if (ProjectGeospatialAreas.Any()) { dependentObjects.Add(typeof(ProjectGeospatialArea).Name); } if (ProjectGeospatialAreaUpdates.Any()) { dependentObjects.Add(typeof(ProjectGeospatialAreaUpdate).Name); } if (SubbasinLiasons.Any()) { dependentObjects.Add(typeof(SubbasinLiason).Name); } return(dependentObjects.Distinct().ToList()); }
/// <summary> /// Does this object have any dependent objects? (If it does have dependent objects, these would need to be deleted before this object could be deleted.) /// </summary> /// <returns></returns> public bool HasDependentObjects() { return(GeospatialAreaImages.Any() || GeospatialAreaPerformanceMeasureFixedTargets.Any() || GeospatialAreaPerformanceMeasureNoTargets.Any() || GeospatialAreaPerformanceMeasureReportingPeriodTargets.Any() || NpccSubbasinProvincesWhereYouAreTheSubbasin.Any() || PersonStewardGeospatialAreas.Any() || ProjectGeospatialAreas.Any() || ProjectGeospatialAreaUpdates.Any() || SubbasinLiasons.Any()); }