public TableInfo ( IList |
||
columns | IList |
The columns that are mapped for the table. |
identifierStrategy | IdentifierStrategy | The identifier strategy used by the table. |
name | string | The name of the table. |
schema | string | The database schema the table exists within (e.g. 'dbo'); otherwise null. |
return | System |
public TableInfo(
IList<ColumnInfo> columns,
IdentifierStrategy identifierStrategy,
string name,
string schema)
{
if (columns == null)
{
throw new ArgumentNullException("columns");
}
if (name == null)
{
throw new ArgumentNullException("name");
}
this.columns = new ReadOnlyCollection<ColumnInfo>(columns);
this.identifierStrategy = identifierStrategy;
this.name = name;
this.schema = schema;
this.identifierColumn = columns.FirstOrDefault(c => c.IsIdentifier);
this.insertColumnCount = columns.Count(c => c.AllowInsert);
this.updateColumnCount = columns.Count(c => c.AllowUpdate);
this.ValidateColumns();
}