Example #1
0
        public WhereFollowingBuilder <T> Where(Expression <Func <WhereDeclaration <T>, WhereDeclaration <T> > > expression)
        {
            WhereDeclaration <T> whereClauseDeclaration = new WhereDeclaration <T>();

            whereClauseDeclaration = expression.Compile().Invoke(whereClauseDeclaration);
            return(Where(whereClauseDeclaration));
        }
        private WhereDeclaration <TSource> BooleanClause <TCustom>(LogicalOperator booleanOperation, IEnumerable <Expression <Func <WhereDeclaration <TCustom>, WhereDeclaration <TCustom> > > > expressions)
        {
            WhereDeclaration <TCustom> nestedDeclaration = new WhereDeclaration <TCustom>();

            foreach (var expres in expressions)
            {
                nestedDeclaration = expres.Compile().Invoke(nestedDeclaration);
            }
            _clauses.Add(new LogicalClause(booleanOperation, nestedDeclaration.GetClauses()));
            return(this);
        }
Example #3
0
 public WhereFollowingBuilder <T> Where(WhereDeclaration <T> declaration)
 {
     return(Where(declaration.GetClauses().Single()));
 }