/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (GeospatialAreas.Any()) { dependentObjects.Add(typeof(GeospatialArea).Name); } if (GeospatialAreaRawDatas.Any()) { dependentObjects.Add(typeof(GeospatialAreaRawData).Name); } if (ProjectCustomGridConfigurations.Any()) { dependentObjects.Add(typeof(ProjectCustomGridConfiguration).Name); } if (ProjectGeospatialAreaTypeNotes.Any()) { dependentObjects.Add(typeof(ProjectGeospatialAreaTypeNote).Name); } if (ProjectGeospatialAreaTypeNoteUpdates.Any()) { dependentObjects.Add(typeof(ProjectGeospatialAreaTypeNoteUpdate).Name); } return(dependentObjects.Distinct().ToList()); }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in GeospatialAreas.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GeospatialAreaRawDatas.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectCustomGridConfigurations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGeospatialAreaTypeNotes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGeospatialAreaTypeNoteUpdates.ToList()) { x.DeleteFull(dbContext); } }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in NotificationProjects.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PerformanceMeasureActuals.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PerformanceMeasureExpecteds.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectAssessmentQuestions.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectAttachments.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectClassifications.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectContacts.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectCustomAttributes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectEvaluations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectExemptReportingYears.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectExternalLinks.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceBudgets.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceExpenditures.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGeospatialAreas.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGeospatialAreaTypeNotes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectImages.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectInternalNotes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectLocations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectLocationStagings.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNoFundingSourceIdentifieds.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNotes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectOrganizations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectProjectStatuses.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectRelevantCostTypes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectTags.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectUpdateBatches.ToList()) { x.DeleteFull(dbContext); } foreach (var x in SecondaryProjectTaxonomyLeafs.ToList()) { x.DeleteFull(dbContext); } foreach (var x in TechnicalAssistanceRequests.ToList()) { x.DeleteFull(dbContext); } }
/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (NotificationProjects.Any()) { dependentObjects.Add(typeof(NotificationProject).Name); } if (PerformanceMeasureActuals.Any()) { dependentObjects.Add(typeof(PerformanceMeasureActual).Name); } if (PerformanceMeasureExpecteds.Any()) { dependentObjects.Add(typeof(PerformanceMeasureExpected).Name); } if (ProjectAssessmentQuestions.Any()) { dependentObjects.Add(typeof(ProjectAssessmentQuestion).Name); } if (ProjectAttachments.Any()) { dependentObjects.Add(typeof(ProjectAttachment).Name); } if (ProjectClassifications.Any()) { dependentObjects.Add(typeof(ProjectClassification).Name); } if (ProjectContacts.Any()) { dependentObjects.Add(typeof(ProjectContact).Name); } if (ProjectCustomAttributes.Any()) { dependentObjects.Add(typeof(ProjectCustomAttribute).Name); } if (ProjectEvaluations.Any()) { dependentObjects.Add(typeof(ProjectEvaluation).Name); } if (ProjectExemptReportingYears.Any()) { dependentObjects.Add(typeof(ProjectExemptReportingYear).Name); } if (ProjectExternalLinks.Any()) { dependentObjects.Add(typeof(ProjectExternalLink).Name); } if (ProjectFundingSourceBudgets.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceBudget).Name); } if (ProjectFundingSourceExpenditures.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceExpenditure).Name); } if (ProjectGeospatialAreas.Any()) { dependentObjects.Add(typeof(ProjectGeospatialArea).Name); } if (ProjectGeospatialAreaTypeNotes.Any()) { dependentObjects.Add(typeof(ProjectGeospatialAreaTypeNote).Name); } if (ProjectImages.Any()) { dependentObjects.Add(typeof(ProjectImage).Name); } if (ProjectInternalNotes.Any()) { dependentObjects.Add(typeof(ProjectInternalNote).Name); } if (ProjectLocations.Any()) { dependentObjects.Add(typeof(ProjectLocation).Name); } if (ProjectLocationStagings.Any()) { dependentObjects.Add(typeof(ProjectLocationStaging).Name); } if (ProjectNoFundingSourceIdentifieds.Any()) { dependentObjects.Add(typeof(ProjectNoFundingSourceIdentified).Name); } if (ProjectNotes.Any()) { dependentObjects.Add(typeof(ProjectNote).Name); } if (ProjectOrganizations.Any()) { dependentObjects.Add(typeof(ProjectOrganization).Name); } if (ProjectProjectStatuses.Any()) { dependentObjects.Add(typeof(ProjectProjectStatus).Name); } if (ProjectRelevantCostTypes.Any()) { dependentObjects.Add(typeof(ProjectRelevantCostType).Name); } if (ProjectTags.Any()) { dependentObjects.Add(typeof(ProjectTag).Name); } if (ProjectUpdateBatches.Any()) { dependentObjects.Add(typeof(ProjectUpdateBatch).Name); } if (SecondaryProjectTaxonomyLeafs.Any()) { dependentObjects.Add(typeof(SecondaryProjectTaxonomyLeaf).Name); } if (TechnicalAssistanceRequests.Any()) { dependentObjects.Add(typeof(TechnicalAssistanceRequest).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(NotificationProjects.Any() || PerformanceMeasureActuals.Any() || PerformanceMeasureExpecteds.Any() || ProjectAssessmentQuestions.Any() || ProjectAttachments.Any() || ProjectClassifications.Any() || ProjectContacts.Any() || ProjectCustomAttributes.Any() || ProjectEvaluations.Any() || ProjectExemptReportingYears.Any() || ProjectExternalLinks.Any() || ProjectFundingSourceBudgets.Any() || ProjectFundingSourceExpenditures.Any() || ProjectGeospatialAreas.Any() || ProjectGeospatialAreaTypeNotes.Any() || ProjectImages.Any() || ProjectInternalNotes.Any() || ProjectLocations.Any() || ProjectLocationStagings.Any() || ProjectNoFundingSourceIdentifieds.Any() || ProjectNotes.Any() || ProjectOrganizations.Any() || ProjectProjectStatuses.Any() || ProjectRelevantCostTypes.Any() || ProjectTags.Any() || ProjectUpdateBatches.Any() || SecondaryProjectTaxonomyLeafs.Any() || TechnicalAssistanceRequests.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(GeospatialAreas.Any() || GeospatialAreaRawDatas.Any() || ProjectCustomGridConfigurations.Any() || ProjectGeospatialAreaTypeNotes.Any() || ProjectGeospatialAreaTypeNoteUpdates.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(GeospatialAreas.Any() || GeospatialAreaRawDatas.Any() || GeospatialAreaTypesWhereYouAreTheEsuDpsGeospatialAreaType.Any() || GeospatialAreaTypesWhereYouAreTheMPGGeospatialAreaType.Any() || GeospatialAreaTypesWhereYouAreThePopulationGeospatialAreaType.Any() || ProjectCustomGridConfigurations.Any() || ProjectGeospatialAreaTypeNotes.Any() || ProjectGeospatialAreaTypeNoteUpdates.Any()); }