12345678910111213141516 |
- using Bowin.Common.Linq;
- using System;
- using System.Collections.Generic;
- using System.Linq.Expressions;
- using System.Text;
- namespace OrderSystem.Entity.Extensions
- {
- public static class ExpressionBuilder
- {
- public static Expression<Func<T, bool>> AndIf<T>(this Expression<Func<T, bool>> first, bool condition, Expression<Func<T, bool>> second)
- {
- return condition ? first.Compose(second, Expression.AndAlso) : first;
- }
- }
- }
|