Build() public method

public Build ( ) : SqlExpression
return SqlExpression
        public static ISelectOrderBuilder Expression(this ISelectOrderBuilder builder, Action<IExpressionBuilder> expression)
        {
            var expBuilder = new ExpressionBuilder();
            expression(expBuilder);

            return builder.Expression(expBuilder.Build());
        }
Exemplo n.º 2
0
        public static IColumnBuilder WithDefault(this IColumnBuilder builder, Action<IExpressionBuilder> expression)
        {
            var expBuilder = new ExpressionBuilder();
            expression(expBuilder);

            return builder.WithDefault(expBuilder.Build());
        }
        public static IQueryExpressionItemBuilder Expression(this IQueryExpressionItemBuilder builder,
			Action<IExpressionBuilder> expression)
        {
            var expBuilder = new ExpressionBuilder();
            expression(expBuilder);

            return builder.Expression(expBuilder.Build());
        }
 public static IExpressionBuilder Function(this IExpressionBuilder builder, ObjectName functionName, params Action<IExpressionBuilder>[] args)
 {
     return builder.Function(functionName, args.Select(x => {
         var expBuilder = new ExpressionBuilder();
         x(expBuilder);
         return expBuilder.Build();
     }).ToArray());
 }
Exemplo n.º 5
0
 public static IExpressionBuilder Function(this IExpressionBuilder builder, ObjectName functionName, params Action <IExpressionBuilder>[] args)
 {
     return(builder.Function(functionName, args.Select(x => {
         var expBuilder = new ExpressionBuilder();
         x(expBuilder);
         return expBuilder.Build();
     }).ToArray()));
 }
Exemplo n.º 6
0
        public static IQueryExpressionBuilder Having(this IQueryExpressionBuilder builder, Action <IExpressionBuilder> expression)
        {
            var expBuilder = new ExpressionBuilder();

            expression(expBuilder);

            return(builder.Having(expBuilder.Build()));
        }
Exemplo n.º 7
0
        public IExpressionBuilder Quantified(SqlExpressionType quantifyType, Action<IExpressionBuilder> exp)
        {
            var builder = new ExpressionBuilder();
            exp(builder);

            expression = SqlExpression.Quantified(quantifyType, builder.Build());

            return this;
        }
        public IExpressionBuilder Quantified(SqlExpressionType quantifyType, Action <IExpressionBuilder> exp)
        {
            var builder = new ExpressionBuilder();

            exp(builder);

            expression = SqlExpression.Quantified(quantifyType, builder.Build());

            return(this);
        }
Exemplo n.º 9
0
        public IExpressionBuilder Binary(SqlExpressionType binaryType, Action<IExpressionBuilder> right)
        {
            if (expression == null)
                throw new InvalidOperationException();

            var builder = new ExpressionBuilder();
            right(builder);

            expression = SqlExpression.Binary(expression, binaryType, builder.Build());

            VerifyUnary();

            return this;
        }
Exemplo n.º 10
0
        public static IQueryExpressionBuilder GroupBy(this IQueryExpressionBuilder builder, params Action <IExpressionBuilder>[] groupBy)
        {
            var expressions = new List <SqlExpression>();

            foreach (var action in groupBy)
            {
                var expBuilder = new ExpressionBuilder();
                action(expBuilder);

                expressions.Add(expBuilder.Build());
            }

            return(builder.GroupBy(expressions.ToArray()));
        }
Exemplo n.º 11
0
        public IExpressionBuilder Binary(SqlExpressionType binaryType, Action <IExpressionBuilder> right)
        {
            if (expression == null)
            {
                throw new InvalidOperationException();
            }

            var builder = new ExpressionBuilder();

            right(builder);

            expression = SqlExpression.Binary(expression, binaryType, builder.Build());

            VerifyUnary();

            return(this);
        }
        public static IQueryExpressionBuilder GroupBy(this IQueryExpressionBuilder builder, params Action<IExpressionBuilder>[] groupBy)
        {
            var expressions = new List<SqlExpression>();
            foreach (var action in groupBy) {
                var expBuilder = new ExpressionBuilder();
                action(expBuilder);

                expressions.Add(expBuilder.Build());
            }

            return builder.GroupBy(expressions.ToArray());
        }