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"); }
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"); }
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); }
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); }