/// <inheritdoc />
        public override void ElementDeleting(ElementDeletingEventArgs e)
        {
            base.ElementDeleting(e);

            ModelDiagramData element = (ModelDiagramData)e.ModelElement;
            Store            store   = element.Store;
            Transaction      current = store.TransactionManager.CurrentTransaction;

            if (current.IsSerializing || ModelRoot.BatchUpdating)
            {
                return;
            }

            if (BooleanQuestionDisplay.Show($"About to permanently delete diagram named {element.Name} - are you sure?") != true)
            {
                current.Rollback();

                return;
            }

            EFModelDiagram diagram = element.GetDiagram();

            ModelDiagramData.CloseDiagram?.Invoke(diagram);
            diagram.Delete();
        }
        /// <summary>
        /// public virtual method for the client to have his own user-defined delete rule class
        /// </summary>
        /// <param name="e"></param>
        public override void ElementDeleted(ElementDeletedEventArgs e)
        {
            base.ElementDeleted(e);
            ModelDiagramData element = (ModelDiagramData)e.ModelElement;
            Store            store   = element.Store;
            Transaction      current = store.TransactionManager.CurrentTransaction;

            if (current.IsSerializing || ModelRoot.BatchUpdating)
            {
                return;
            }

            EFModelDiagram diagram = element.GetDiagram();

            ModelDiagramData.CloseDiagram?.Invoke(diagram);
            diagram.Delete();
        }