public string ToSql(Column column) { var modifiers = column.Length != null ? string.Format("({0})", column.Length) : ""; return string.Format("[{0}] [{1}]{2}", column.Name, ToSql(column.DbType), modifiers); }
public void CreateColumn(string columnName, DbType type, int length) { var column = new Column(columnName, type, length); var addColumnSql = string.Format(@"alter table {0} add {1}", Name, Adapter.ToSql(column)); Adapter.DbSql(addColumnSql); }