/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in SourceControlBMPs.ToList()) { x.DeleteFull(dbContext); } }
/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (SourceControlBMPs.Any()) { dependentObjects.Add(typeof(SourceControlBMP).Name); } return(dependentObjects.Distinct().ToList()); }
/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (LoadGeneratingUnits.Any()) { dependentObjects.Add(typeof(LoadGeneratingUnit).Name); } if (QuickBMPs.Any()) { dependentObjects.Add(typeof(QuickBMP).Name); } if (SourceControlBMPs.Any()) { dependentObjects.Add(typeof(SourceControlBMP).Name); } if (TreatmentBMPs.Any()) { dependentObjects.Add(typeof(TreatmentBMP).Name); } if (WaterQualityManagementPlanDocuments.Any()) { dependentObjects.Add(typeof(WaterQualityManagementPlanDocument).Name); } if (WaterQualityManagementPlanParcels.Any()) { dependentObjects.Add(typeof(WaterQualityManagementPlanParcel).Name); } if (WaterQualityManagementPlanVerifies.Any()) { dependentObjects.Add(typeof(WaterQualityManagementPlanVerify).Name); } return(dependentObjects.Distinct().ToList()); }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in LoadGeneratingUnits.ToList()) { x.DeleteFull(dbContext); } foreach (var x in QuickBMPs.ToList()) { x.DeleteFull(dbContext); } foreach (var x in SourceControlBMPs.ToList()) { x.DeleteFull(dbContext); } foreach (var x in TreatmentBMPs.ToList()) { x.DeleteFull(dbContext); } foreach (var x in WaterQualityManagementPlanDocuments.ToList()) { x.DeleteFull(dbContext); } foreach (var x in WaterQualityManagementPlanParcels.ToList()) { x.DeleteFull(dbContext); } foreach (var x in WaterQualityManagementPlanVerifies.ToList()) { x.DeleteFull(dbContext); } }
/// <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(SourceControlBMPs.Any()); }
/// <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(LoadGeneratingUnits.Any() || QuickBMPs.Any() || SourceControlBMPs.Any() || TreatmentBMPs.Any() || WaterQualityManagementPlanDocuments.Any() || WaterQualityManagementPlanParcels.Any() || WaterQualityManagementPlanVerifies.Any()); }