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