public override Expression <Func <T, bool> > ToExpression() { Expression <Func <T, bool> > expression = _spec.ToExpression(); UnaryExpression andExpression = Expression.Not(expression); return(Expression.Lambda <Func <T, bool> >( andExpression, expression.Parameters.Single())); }
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())); }