/// <summary> /// Parses a data record into a <see cref="DatabaseConstraintColumn" /> instance. /// </summary> private DomainTableConstraintColumn ParseConstraintColumn(DomainTableConstraint constraint, IDataRecord record) { DomainTableConstraintColumn constraintColumn = constraint.CreateColumn(); constraintColumn.ConstraintColumn = constraint.Table.TableColumns.FirstOrDefault(column => column.ColumnName == record["column_name"].ConvertTo <String>()); constraintColumn.ReferencedColumn = constraint.ReferencedTable.TableColumns.FirstOrDefault(column => column.ColumnName == record["column_reference"].ConvertTo <String>()); return(constraintColumn); }
/// <summary> /// Deserialises the version history from the specified xml element. /// </summary> internal static void Deserialise(DomainTableConstraint constraint, XmlNode parentNode) { foreach (XmlNode xmlNode in parentNode.SelectNodes("column")) { DomainTableConstraintColumn result = constraint.CreateColumn(); result.Deserialise(xmlNode); } }