Пример #1
0
        private void CreateEmptyEDMX()
        {
            //get namespace URIs
            string edmxNamespaceURI = NSM.LookupNamespace("edmx");
            string ssdlNamespaceURI = NSM.LookupNamespace("ssdl");
            string csdlNamespaceURI = NSM.LookupNamespace("edm");

            //create the basic structure of the EDMX file wrapper
            XmlElement runtimeElement = _edmxDocument.CreateElement("Runtime", edmxNamespaceURI);

            EDMXDocument.DocumentElement.AppendChild(runtimeElement);

            XmlElement storageModels = _edmxDocument.CreateElement("StorageModels", edmxNamespaceURI);

            runtimeElement.AppendChild(storageModels);

            XmlElement conceptualModels = _edmxDocument.CreateElement("ConceptualModels", edmxNamespaceURI);

            runtimeElement.AppendChild(conceptualModels);

            XmlElement mappingsElement = _edmxDocument.CreateElement("Mappings", edmxNamespaceURI);

            runtimeElement.AppendChild(mappingsElement);

            XmlElement designerElement = _edmxDocument.CreateElement("Designer", edmxNamespaceURI);

            EDMXDocument.DocumentElement.AppendChild(designerElement);
            designerElement.GetOrCreateElement("edmx", "Diagrams", NSM);
        }