コード例 #1
0
 public static IWhereResult <T, TMe> WhereSub <T, TMe>(this IWhereTarget <T, TMe> fluentBuilder, Action <IAndWhereTarget <T, TMe> > expression)
 {
     fluentBuilder.AppendWhere();
     fluentBuilder.QueryBuilder.StringBuilder.Append("(");
     expression((IAndWhereTarget <T, TMe>)fluentBuilder);
     fluentBuilder.QueryBuilder.StringBuilder.AfterSubExpression();
     fluentBuilder.CurrentContext = QueryContext.Where;
     return((IWhereResult <T, TMe>)fluentBuilder);
 }
コード例 #2
0
        public static IWhereResult <T, TMe> Where <T, TMe>(this IWhereTarget <T, TMe> fluentBuilder, Action <ISelectResult <T, TMe> > subQuery, SubQueryType type)
        {
            fluentBuilder.AppendWhere();
            switch (type)
            {
            case SubQueryType.Exists:
                fluentBuilder.QueryBuilder.StringBuilder.AppendAfterSpace("EXISTS");
                break;

            case SubQueryType.NotExists:
                fluentBuilder.QueryBuilder.StringBuilder.AppendAfterSpace("NOT EXISTS");
                break;
            }

            fluentBuilder.SubQuery(subQuery);
            return((IWhereResult <T, TMe>)fluentBuilder);
        }
コード例 #3
0
 public static IWhereResult <T, TMe> Where <T, TMe>(this IWhereTarget <T, TMe> fluentBuilder, Expression <Func <T, TMe, bool> > expression)
 {
     fluentBuilder.AppendWhere();
     fluentBuilder.QueryBuilder.AddBooleanExpression(expression.Body);
     return((IWhereResult <T, TMe>)fluentBuilder);
 }