コード例 #1
0
        /// <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);
        }
コード例 #2
0
 /// <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);
     }
 }