public override Expression <Func <T, bool> > ToExpression() { var expression = _specification.ToExpression(); var notExpression = Expression.Not(expression.Body); return(Expression.Lambda <Func <T, bool> >(notExpression, expression.Parameters.Single())); }
public override Expression <Func <T, bool> > ToExpression() { var leftExpression = _left.ToExpression(); var rightExpression = _right.ToExpression(); var andExpression = Expression.AndAlso(leftExpression.Body, rightExpression.Body); return(Expression.Lambda <Func <T, bool> >(andExpression, leftExpression.Parameters.Single())); }