/// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (CustomAttributes.Any())
            {
                dependentObjects.Add(typeof(CustomAttribute).Name);
            }

            if (MaintenanceRecords.Any())
            {
                dependentObjects.Add(typeof(MaintenanceRecord).Name);
            }

            if (MaintenanceRecordObservations.Any())
            {
                dependentObjects.Add(typeof(MaintenanceRecordObservation).Name);
            }

            if (QuickBMPs.Any())
            {
                dependentObjects.Add(typeof(QuickBMP).Name);
            }

            if (TreatmentBMPs.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMP).Name);
            }

            if (TreatmentBMPAssessments.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPAssessment).Name);
            }

            if (TreatmentBMPBenchmarkAndThresholds.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPBenchmarkAndThreshold).Name);
            }

            if (TreatmentBMPObservations.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPObservation).Name);
            }

            if (TreatmentBMPTypeAssessmentObservationTypes.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPTypeAssessmentObservationType).Name);
            }

            if (TreatmentBMPTypeCustomAttributeTypes.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPTypeCustomAttributeType).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in CustomAttributes.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in MaintenanceRecords.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in MaintenanceRecordObservations.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in QuickBMPs.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TreatmentBMPs.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TreatmentBMPAssessments.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TreatmentBMPBenchmarkAndThresholds.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TreatmentBMPObservations.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TreatmentBMPTypeAssessmentObservationTypes.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TreatmentBMPTypeCustomAttributeTypes.ToList())
            {
                x.DeleteFull(dbContext);
            }
        }
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in CustomAttributes.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in MaintenanceRecordObservations.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TreatmentBMPTypeCustomAttributeTypes.ToList())
            {
                x.DeleteFull(dbContext);
            }
        }
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (CustomAttributes.Any())
            {
                dependentObjects.Add(typeof(CustomAttribute).Name);
            }

            if (MaintenanceRecordObservations.Any())
            {
                dependentObjects.Add(typeof(MaintenanceRecordObservation).Name);
            }

            if (TreatmentBMPTypeCustomAttributeTypes.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPTypeCustomAttributeType).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(CustomAttributes.Any() || MaintenanceRecords.Any() || MaintenanceRecordObservations.Any() || QuickBMPs.Any() || TreatmentBMPs.Any() || TreatmentBMPAssessments.Any() || TreatmentBMPBenchmarkAndThresholds.Any() || TreatmentBMPObservations.Any() || TreatmentBMPTypeAssessmentObservationTypes.Any() || TreatmentBMPTypeCustomAttributeTypes.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(CustomAttributes.Any() || MaintenanceRecordObservations.Any() || TreatmentBMPTypeCustomAttributeTypes.Any());
 }