本文整理匯總了C#中NHibernate.Mapping.Table.AddColumn方法的典型用法代碼示例。如果您正苦於以下問題:C# Table.AddColumn方法的具體用法?C# Table.AddColumn怎麽用?C# Table.AddColumn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NHibernate.Mapping.Table
的用法示例。
在下文中一共展示了Table.AddColumn方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AddAuditColumns
protected virtual void AddAuditColumns(Table auditTable,
IEnumerable<AuditColumn> auditColumns)
{
foreach (var column in auditColumns)
{
auditTable.AddColumn(column);
if (column.IncludeInPrimaryKey)
auditTable.PrimaryKey.AddColumn(column);
}
}
示例2: BindColumn
private void BindColumn(HbmColumn hbmColumn, Table table, bool isNullable)
{
var col = new Column {Value = value};
BindColumn(hbmColumn, col, isNullable);
if (table != null)
table.AddColumn(col);
value.AddColumn(col);
//column index
BindIndex(hbmColumn.index, table, col);
//column group index (although it can serve as a separate column index)
BindUniqueKey(hbmColumn.uniquekey, table, col);
}
示例3: PrepareTemporaryTables
public void PrepareTemporaryTables(IMapping mapping, Dialect.Dialect dialect)
{
if (dialect.SupportsTemporaryTables)
{
temporaryIdTableName = dialect.GenerateTemporaryTableName(Table.Name);
Table table = new Table();
table.Name = temporaryIdTableName;
foreach (Column column in Table.PrimaryKey.ColumnIterator)
{
table.AddColumn((Column)column.Clone());
}
temporaryIdTableDDL = table.SqlTemporaryTableCreateString(dialect, mapping);
}
}
示例4: CopyColumns
protected virtual void CopyColumns(Table dataTable,
Table auditTable)
{
foreach (var column in dataTable.ColumnIterator)
auditTable.AddColumn((Column)column.Clone());
}