public void DeleteFullAndChildless(DatabaseEntities dbContext) { foreach (var x in GrantAllocationFileResources.ToList()) { x.DeleteFullAndChildless(dbContext); } DeleteChildren(dbContext); Delete(dbContext); }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in AgreementsWhereYouAreTheAgreementFileResource.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ClassificationsWhereYouAreTheKeyImageFileResource.ToList()) { x.DeleteFull(dbContext); } foreach (var x in CustomPageImages.ToList()) { x.DeleteFull(dbContext); } foreach (var x in FieldDefinitionDataImages.ToList()) { x.DeleteFull(dbContext); } foreach (var x in FirmaHomePageImages.ToList()) { x.DeleteFull(dbContext); } foreach (var x in FirmaPageImages.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationAwardContractorInvoicesWhereYouAreTheGrantAllocationAwardContractorInvoiceFileResource.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationFileResources.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantFileResources.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantModificationFileResources.ToList()) { x.DeleteFull(dbContext); } foreach (var x in InteractionEventFileResources.ToList()) { x.DeleteFull(dbContext); } foreach (var x in InvoicesWhereYouAreTheInvoiceFileResource.ToList()) { x.DeleteFull(dbContext); } foreach (var x in OrganizationsWhereYouAreTheLogoFileResource.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PriorityLandscapeFileResources.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectDocuments.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectDocumentUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectImages.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectImageUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in SystemAttributesWhereYouAreTheBannerLogoFileResource.ToList()) { x.DeleteFull(dbContext); } foreach (var x in SystemAttributesWhereYouAreTheSquareLogoFileResource.ToList()) { x.DeleteFull(dbContext); } }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in AgreementGrantAllocations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationAwards.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationBudgetLineItems.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationChangeLogs.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationExpenditures.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationFileResources.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationNotes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationNoteInternals.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationProgramIndexProjectCodes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in GrantAllocationProgramManagers.ToList()) { x.DeleteFull(dbContext); } foreach (var x in InvoiceLineItems.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGrantAllocationExpenditures.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGrantAllocationExpenditureUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGrantAllocationRequests.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGrantAllocationRequestUpdates.ToList()) { x.DeleteFull(dbContext); } }