public TableGenerator(DatabaseTable table) : base(table) { SqlType?originSqlType = null; if (table.DatabaseSchema != null) { originSqlType = ProviderToSqlType.Convert(table.DatabaseSchema.Provider); } DataTypeWriter = new DataTypeWriter(originSqlType); }
/// <summary> /// Initializes a new instance of the <see cref="ProcedureGenerator"/> class. /// </summary> /// <param name="table">The table.</param> public ProcedureGenerator(DatabaseTable table) : base(table) { SqlWriter = new SqlWriter(table, SqlType.SqlServer); SqlType?originSqlType = null; if (table.DatabaseSchema != null) { originSqlType = ProviderToSqlType.Convert(table.DatabaseSchema.Provider); } _dataTypeWriter = new DataTypeWriter(originSqlType); }
protected override string ColumnDataType(string dataType) { return(DataTypeWriter.WriteDataType(dataType)); }