src/Misc/EFTools/EntityDesignEntityDesigner/CustomCode/Diagram/EntityDesignerDiagram.cs
/// <summary>
///     Loop through Clipboard objects and determine whether there are EFObject that should be in the diagram but are not.
/// </summary>
/// <param name="clipboardObjects"></param>
/// <returns></returns>
Loop through Clipboard objects and determine whether there are EFObject that should be in the diagram but are not.
Loop through Clipboard objects and determine whether there are EFObject that should be in the diagram but are not .
private IList<EFElement> GetEFElementNotInDiagramFromClipboardObject(EntitiesClipboardFormat clipboardObjects)
        {
            var modelDiagram = ModelElement.ModelXRef.GetExisting(this) as ModelDiagram;
            var artifactSet = modelDiagram.Artifact.ArtifactSet;
            IList<EFElement> efElements = new List<EFElement>();
            foreach (var clipboardObject in clipboardObjects.ClipboardEntities)
            {
                var efElement = artifactSet.LookupSymbol(clipboardObject.NormalizedName);
                if (efElement != null
                    && modelDiagram.IsEFObjectRepresentedInDiagram(efElement) == false)
                {
                    efElements.Add(efElement);
                }
            }
            return efElements;
        }
private IList < EFElement > GetEFElementNotInDiagramFromClipboardObject ( EntitiesClipboardFormat clipboardObjects ) { var modelDiagram = ModelElement . ModelXRef . GetExisting ( this ) as ModelDiagram ; var artifactSet = modelDiagram . Artifact . ArtifactSet ; IList < EFElement > efElements = new List < EFElement > ( ) ; foreach ( var clipboardObject in clipboardObjects . ClipboardEntities ) { var efElement = artifactSet . LookupSymbol ( clipboardObject . NormalizedName ) ; if ( efElement != null && modelDiagram . IsEFObjectRepresentedInDiagram ( efElement ) == false ) { efElements . Add ( efElement ) ; } } return efElements ; }
Loop through Clipboard objects and determine whether there are EFObject that should be in the diagram but are not.
Loop through Clipboard objects and determine whether there are EFObject that should be in the diagram but are not .
// We are only interested in entity-types all the associations will be automatically created when entity-types are added to diagram.
None
clipboardObjects
EntitiesClipboardFormat
None