コード例 #1
0
        public override Expression <Func <T, bool> > ToExpression()
        {
            Expression <Func <T, bool> > expression = _specification.ToExpression();
            UnaryExpression notExpression           = Expression.Not(expression.Body);

            return(Expression.Lambda <Func <T, bool> >(notExpression, expression.Parameters.Single()));
        }
コード例 #2
0
        public override Expression <Func <T, bool> > ToExpression()
        {
            Expression <Func <T, bool> > leftExpression  = _left.ToExpression();
            Expression <Func <T, bool> > rightExpression = _right.ToExpression();
            BinaryExpression             andExpression   = Expression.AndAlso(leftExpression.Body, rightExpression.Body);

            return(Expression.Lambda <Func <T, bool> >(andExpression, leftExpression.Parameters.Single()));
        }