Exemplo n.º 1
0
        public TableGenerator(DatabaseTable table)
            : base(table)
        {
            SqlType?originSqlType = null;

            if (table.DatabaseSchema != null)
            {
                originSqlType = ProviderToSqlType.Convert(table.DatabaseSchema.Provider);
            }

            DataTypeWriter = new DataTypeWriter(originSqlType);
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 protected override string ColumnDataType(string dataType)
 {
     return(DataTypeWriter.WriteDataType(dataType));
 }