Пример #1
0
        public virtual void Build(ITableSource table, string columnName, DbCommandBuilder builder, IServiceProvider serviceProvider)
        {
            var aliasOption = serviceProvider.GetRequiredService <AliasOption>();

            var tableAttributes = table.GetTableAttributes();

            if (aliasOption.EmitTable)
            {
                builder.SqlBuilder.Write(tableAttributes.Alias ?? tableAttributes.Name);
                builder.SqlBuilder.Write(".");
            }

            builder.SqlBuilder.Write(OpeningQuote);
            builder.SqlBuilder.Write(columnName);
            builder.SqlBuilder.Write(ClosingQuote);
        }