示例#1
0
        protected virtual void CopyPrimaryKey(Table dataTable,
                                              Table auditTable)
        {
            if (dataTable.PrimaryKey != null)
            {
                var pk = new PrimaryKey();

                pk.AddColumns(
                    from column in dataTable.PrimaryKey.ColumnIterator
                    select auditTable.GetColumn(column));

                auditTable.PrimaryKey = pk;
            }
        }