public XElement ToXElement() { XElement OElement = new XElement("Column", new XAttribute("Name", Name), new XAttribute("DataType", DataType), new XAttribute("MaxLength", MaxLength), new XAttribute("Nullable", Nullable), new XAttribute("DefaultValue", DefaultValue ?? ""), new XAttribute("PrimaryKey", PrimaryKey), new XAttribute("Required", Required), new XAttribute("AutoIncrement", AutoIncrement)); foreach (String OKey in FAdddionalMetadata.Keys) { OElement.Add(new XAttribute(OKey, FAdddionalMetadata[OKey])); } XElement ORelationships = new XElement("DatabaseRelationships"); OElement.Add(ORelationships); foreach (Database ODatabase in FDatabaseRelationships.Values) { ORelationships.Add(ODatabase.ToRelationshipXElement()); } return(OElement); }
public XElement ToXElement() { XElement OElement = new XElement("Table", new XAttribute("Schema", SchemaName), new XAttribute("Name", TableName), new XAttribute("Replicated", IsReplicated), new XAttribute("CreatedDate", CreatedDate), new XAttribute("LastModifiedDate", LastModifiedDate)); foreach (String OKey in FAdddionalMetadata.Keys) { OElement.Add(new XAttribute(OKey, FAdddionalMetadata[OKey])); } XElement ORelationships = new XElement("DatabaseRelationships"); OElement.Add(ORelationships); foreach (Database ODatabase in FDatabaseRelationships.Values) { ORelationships.Add(ODatabase.ToRelationshipXElement()); } foreach (Column OColumn in FColumns.Values) { OElement.Add(OColumn.ToXElement()); } return(OElement); }