예제 #1
0
        private ExplorerDiagram AddDiagram(Diagram diagram)
        {
            var explorerDiagram = ModelToExplorerModelXRef.GetNew(_context, diagram, this, typeof(ExplorerDiagram)) as ExplorerDiagram;

            _diagrams.Insert(explorerDiagram);
            return(explorerDiagram);
        }
예제 #2
0
        private ExplorerEnumType AddEnumType(EnumType enumType)
        {
            var explorerEnumType = ModelToExplorerModelXRef.GetNew(_context, enumType, this, typeof(ExplorerEnumType)) as ExplorerEnumType;

            _enumTypes.Insert(explorerEnumType);
            return(explorerEnumType);
        }
        private ExplorerAssociationSet AddAssociationSet(AssociationSet entityType)
        {
            var explorerAssocSet =
                ModelToExplorerModelXRef.GetNew(_context, entityType, this, typeof(ExplorerAssociationSet)) as ExplorerAssociationSet;

            _associationSets.Insert(explorerAssocSet);
            return(explorerAssocSet);
        }
예제 #4
0
        private ExplorerFunction AddFunction(Function function)
        {
            var explorerFunction =
                ModelToExplorerModelXRef.GetNew(_context, function, this, typeof(ExplorerFunction)) as ExplorerFunction;

            _functions.Insert(explorerFunction);
            return(explorerFunction);
        }
        private ExplorerEntitySet AddEntitySet(EntitySet entitySet)
        {
            var explorerEntitySet =
                ModelToExplorerModelXRef.GetNew(_context, entitySet, this, typeof(ExplorerEntitySet)) as ExplorerEntitySet;

            _entitySets.Insert(explorerEntitySet);
            return(explorerEntitySet);
        }
        private ExplorerComplexType AddComplexType(ComplexType complexType)
        {
            var explorerComplexType =
                ModelToExplorerModelXRef.GetNew(_context, complexType, this, typeof(ExplorerComplexType)) as ExplorerComplexType;

            _complexTypes.Insert(explorerComplexType);
            return(explorerComplexType);
        }
예제 #7
0
        private ExplorerFunctionImport AddFunctionImport(FunctionImport funcImport)
        {
            var explorerFuncImport =
                ModelToExplorerModelXRef.GetNew(_context, funcImport, this, typeof(ExplorerFunctionImport)) as ExplorerFunctionImport;

            _functionImports.Insert(explorerFuncImport);
            return(explorerFuncImport);
        }
예제 #8
0
        private ExplorerParameter AddParameter(Parameter param)
        {
            var explorerParam =
                ModelToExplorerModelXRef.GetNew(_context, param, this, typeof(ExplorerParameter)) as ExplorerParameter;

            _parameters.Insert(explorerParam);
            return(explorerParam);
        }
예제 #9
0
        private ExplorerNavigationProperty AddNavigationProperty(NavigationProperty navProp)
        {
            var explorerNavProp =
                ModelToExplorerModelXRef.GetNew(_context, navProp, this, typeof(ExplorerNavigationProperty)) as ExplorerNavigationProperty;

            _navigationProperties.Insert(explorerNavProp);
            return(explorerNavProp);
        }
예제 #10
0
        private ExplorerProperty AddProperty(Property prop)
        {
            ExplorerProperty explorerProp = null;

            explorerProp =
                ModelToExplorerModelXRef.GetNew(_context, prop, this, typeof(ExplorerConceptualProperty)) as ExplorerConceptualProperty;
            _properties.Insert(explorerProp);
            return(explorerProp);
        }
예제 #11
0
        private ExplorerProperty AddProperty(Property prop)
        {
            ExplorerProperty explorerProp = null;

            if (prop.EntityModel.IsCSDL)
            {
                explorerProp =
                    ModelToExplorerModelXRef.GetNew(_context, prop, this, typeof(ExplorerConceptualProperty)) as ExplorerConceptualProperty;
            }
            else
            {
                explorerProp =
                    ModelToExplorerModelXRef.GetNew(_context, prop, this, typeof(ExplorerStorageProperty)) as ExplorerStorageProperty;
            }
            _properties.Insert(explorerProp);
            return(explorerProp);
        }
        private ExplorerAssociation AddAssociation(Association assoc)
        {
            ExplorerAssociation explorerAssociation = null;

            if (assoc.EntityModel.IsCSDL)
            {
                explorerAssociation =
                    ModelToExplorerModelXRef.GetNew(_context, assoc, this, typeof(ExplorerConceptualAssociation)) as
                    ExplorerConceptualAssociation;
            }
            else
            {
                explorerAssociation =
                    ModelToExplorerModelXRef.GetNew(_context, assoc, this, typeof(ExplorerStorageAssociation)) as ExplorerStorageAssociation;
            }
            _associations.Insert(explorerAssociation);
            return(explorerAssociation);
        }
예제 #13
0
        private ExplorerEntityType AddEntityType(EntityType entityType)
        {
            ExplorerEntityType explorerEntityType = null;

            if (_isConceptual)
            {
                explorerEntityType =
                    ModelToExplorerModelXRef.GetNew(_context, entityType, this, typeof(ExplorerConceptualEntityType)) as ExplorerEntityType;
            }
            else
            {
                explorerEntityType =
                    ModelToExplorerModelXRef.GetNew(_context, entityType, this, typeof(ExplorerStorageEntityType)) as ExplorerEntityType;
            }

            _entityTypes.Insert(explorerEntityType);
            return(explorerEntityType);
        }