Esempio n. 1
0
 public ConnectionDefinition(Connection connection)
 {
     Element = new EntityElement("Connection");
     Element.attributes.Add(ConnectionFirstTableAttribute, connection.FirstTable);
     Element.attributes.Add(ConnectionFirstRelationAttribute, connection.FirstRelation);
     Element.attributes.Add(ConnectionSecondTableAttribute, connection.SecondTable);
     Element.attributes.Add(ConnectionSecondRelationAttribute, connection.SecondRelation);
     Element.attributes.Add(ConnectionNameAttribute, "5");
 }
Esempio n. 2
0
        private ConnectionDefinition()
        {
            Element = new EntityElement("Connection");

            Element.attributes.Add(ConnectionFirstTableAttribute, "5");
            Element.attributes.Add(ConnectionFirstRelationAttribute, "5");
            Element.attributes.Add(ConnectionSecondTableAttribute, "5");
            Element.attributes.Add(ConnectionSecondRelationAttribute, "5");
            Element.attributes.Add(ConnectionNameAttribute, "5");
        }
Esempio n. 3
0
        public TableDefinition()
        {
            Element = new EntityElement("Table");
            //Element.attributes.Add(TableNameAttribute, "5");
            var PropertiesElement = new EntityElement(TablePropertiesTag);
            var PropertyElement   = new EntityElement(TablePropertyTag, false);

            PropertyElement.attributes.Add(TablePropertyName, "5");
            PropertyElement.attributes.Add(TablePropertyType, "5");
            PropertiesElement.entityelements.Add(PropertyElement);

            Element.entityelements.Add(PropertiesElement);
        }
Esempio n. 4
0
        public TableDefinition(Table table)
        {
            Element = new EntityElement(TableTag);
            var PropertiesElement = new EntityElement(TablePropertiesTag);

            foreach (Properties p in table.Properties)
            {
                if (string.IsNullOrEmpty(p.Name) || string.IsNullOrEmpty(p.Type))
                {
                    continue;
                }
                var PropertyElement = new EntityElement(TablePropertyTag, false);
                PropertyElement.attributes.Add(TablePropertyName, p.Name);
                PropertyElement.attributes.Add(TablePropertyType, p.Type);
                PropertiesElement.entityelements.Add(PropertyElement);
            }
            Element.entityelements.Add(PropertiesElement);
        }