src/Misc/EFTools/EntityDesignModel/Commands/DeleteEntityTypeCommand.cs
/// <summary>
///     We override this method because we need to do some extra things before
///     the normal PreInvoke gets called and our antiDeps are removed
/// </summary>
/// <param name="cpc"></param>
We override this method because we need to do some extra things before
the normal PreInvoke gets called and our antiDeps are removed
We override this method because we need to do some extra things before the normal PreInvoke gets called and our antiDeps are removed
protected override void PreInvoke(CommandProcessorContext cpc)
        {
            SaveDeletedInformation();
            if (EntityType.EntityModel.IsCSDL)
            {
                EnforceEntitySetMappingRules.AddRule(cpc, EntityType);
                var cet = EntityType as ConceptualEntityType;
                Debug.Assert(cet != null, "EntityType is not a ConceptualEntityType");
                foreach (var derivedType in cet.ResolvableDirectDerivedTypes)
                {
                    var cmd = new DeleteInheritanceCommand(derivedType);
                    CommandProcessor.InvokeSingleCommand(cpc, cmd);
                }
            }
            base.PreInvoke(cpc);
        }
protected override void PreInvoke ( CommandProcessorContext cpc ) { SaveDeletedInformation ( ) ; if ( EntityType . EntityModel . IsCSDL ) { EnforceEntitySetMappingRules . AddRule ( cpc , EntityType ) ; var cet = EntityType as ConceptualEntityType ; Debug . Assert ( cet != null , " " ) ; foreach ( var derivedType in cet . ResolvableDirectDerivedTypes ) { var cmd = new DeleteInheritanceCommand ( derivedType ) ; CommandProcessor . InvokeSingleCommand ( cpc , cmd ) ; } } base . PreInvoke ( cpc ) ; }
We override this method because we need to do some extra things before
the normal PreInvoke gets called and our antiDeps are removed
We override this method because we need to do some extra things before the normal PreInvoke gets called and our antiDeps are removed
// save off the deleted entity type name // enforce our mapping rules for C-side entities // remove base type for all derived EntityTypes
cpc
CommandProcessorContext
None