src/Misc/EFTools/EntityDesign/UI/ViewModels/MappingDetails/Function/MappingFunctionScalarProperty.cs
// <summary>
//     The mapping view model contains a MappingFunctionScalarProperty for every parameter in the function.  The user can clear out the
//     underlying scalar property, but that doesn't remove or add the MappingFunctionScalarProperty.  We need the placeholder
//     in the view model to show the nodes in the Trid even if there isn't a mapping.  Thus, we don't need to call
//     this.Parent.RemoveChild(this) as we want to leave the placeholder.
// </summary>
The mapping view model contains a MappingFunctionScalarProperty for every parameter in the function.  The user can clear out the
underlying scalar property, but that doesn't remove or add the MappingFunctionScalarProperty.  We need the placeholder
in the view model to show the nodes in the Trid even if there isn't a mapping.  Thus, we don't need to call
this.Parent.RemoveChild(this) as we want to leave the placeholder.
The mapping view model contains a MappingFunctionScalarProperty for every parameter in the function . The user can clear out the underlying scalar property but that doesn ' t remove or add the MappingFunctionScalarProperty . We need the placeholder in the view model to show the nodes in the Trid even if there isn ' t a mapping . Thus we don ' t need to call this . Parent . RemoveChild ( this ) as we want to leave the placeholder .
internal override void DeleteModelItem(CommandProcessorContext cpc)
        {
            Debug.Assert(ModelItem != null, "We are trying to delete a null ModelItem");
            if (IsModelItemDeleted() == false)
            {
                var storeParam = StoreParameter;
                if (cpc == null)
                {
                    cpc = new CommandProcessorContext(
                        Context, EfiTransactionOriginator.MappingDetailsOriginatorId, Resources.Tx_DeleteScalarProperty);
                }
                var deleteCommand = ScalarProperty.GetDeleteCommand();
                deleteCommand.PostInvokeEvent += (o, eventsArgs) => { ModelItem = null; };
                DeleteEFElementCommand.DeleteInTransaction(cpc, deleteCommand);
                _storeParameter = storeParam;
            }
            ModelItem = null;
        }
internal override void DeleteModelItem ( CommandProcessorContext cpc ) { Debug . Assert ( ModelItem != null , " " ) ; if ( IsModelItemDeleted ( ) == false ) { var storeParam = StoreParameter ; if ( cpc == null ) { cpc = new CommandProcessorContext ( Context , EfiTransactionOriginator . MappingDetailsOriginatorId , Resources . Tx_DeleteScalarProperty ) ; } var deleteCommand = ScalarProperty . GetDeleteCommand ( ) ; deleteCommand . PostInvokeEvent += ( o , eventsArgs ) => { ModelItem = null ; } ; DeleteEFElementCommand . DeleteInTransaction ( cpc , deleteCommand ) ; _storeParameter = storeParam ; } ModelItem = null ; }
The mapping view model contains a MappingFunctionScalarProperty for every parameter in the function.
The mapping view model contains a MappingFunctionScalarProperty for every parameter in the function .
// since we are deleting the SP, we need to go back to our "base-less" mode // where the column info is returned as instance strings - cache off the data // create a context if we weren't passed one // use the item's delete command // restore the data so the display is correct // if IsModelItemDeleted == true, just make sure that it is null anyways
cpc
CommandProcessorContext