| | |
| | | return Expression.Lambda<T>(merge(first.Body, secondBody), first.Parameters); |
| | | } |
| | | |
| | | public static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) |
| | | //public static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) |
| | | //{ |
| | | // return first.Compose(second, Expression.And); |
| | | //} |
| | | public static Expression<Func<T, bool>> AndAlso<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) |
| | | { |
| | | return first.Compose(second, Expression.And); |
| | | return first.Compose(second, Expression.AndAlso); |
| | | } |
| | | |
| | | public static Expression<Func<T, bool>> Or<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) |