src/Misc/EFTools/EntityDesign/UI/ViewModels/MappingDetails/Function/MappingResultBinding.cs
// <summary>
//     NOTE: We don't call this.Parent.RemoveChild(this) here because this is always called from the MappingEFElement.Delete() method
//     which will remove this item from the parent.
// </summary>
We don't call this.Parent.RemoveChild(this) here because this is always called from the MappingEFElement.Delete() method
which will remove this item from the parent.
We don ' t call this . Parent . RemoveChild ( this ) here because this is always called from the MappingEFElement . Delete () method which will remove this item from the parent .
internal override void DeleteModelItem(CommandProcessorContext cpc)
        {
            Debug.Assert(ModelItem != null, "We are trying to delete a null ModelItem");
            if (IsModelItemDeleted() == false)
            {
                if (cpc == null)
                {
                    cpc = new CommandProcessorContext(
                        Context, EfiTransactionOriginator.MappingDetailsOriginatorId, Resources.Tx_DeleteResultBinding);
                }
                var deleteCommand = ResultBinding.GetDeleteCommand();
                deleteCommand.PostInvokeEvent += (o, eventsArgs) => { ModelItem = null; };
                DeleteEFElementCommand.DeleteInTransaction(cpc, deleteCommand);
            }
            ModelItem = null;
        }
internal override void DeleteModelItem ( CommandProcessorContext cpc ) { Debug . Assert ( ModelItem != null , " " ) ; if ( IsModelItemDeleted ( ) == false ) { if ( cpc == null ) { cpc = new CommandProcessorContext ( Context , EfiTransactionOriginator . MappingDetailsOriginatorId , Resources . Tx_DeleteResultBinding ) ; } var deleteCommand = ResultBinding . GetDeleteCommand ( ) ; deleteCommand . PostInvokeEvent += ( o , eventsArgs ) => { ModelItem = null ; } ; DeleteEFElementCommand . DeleteInTransaction ( cpc , deleteCommand ) ; } ModelItem = null ; }
NOTE: We don't call this.Parent.RemoveChild(this) here because this is always called from the MappingEFElement.Delete() method
which will remove this item from the parent.
NOTE : We don ' t call this . Parent . RemoveChild ( this ) here because this is always called from the MappingEFElement . Delete () method which will remove this item from the parent .
// use the item's delete command // if IsModelItemDeleted == true, just make sure that it is null anyways
cpc
CommandProcessorContext