本文整理汇总了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());
}