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