public static Expression NotLike(this MemberExpression member, string value, bool excludeNull = false) { var expr = Expression.Not(member.Contains(value)); if (excludeNull) { return(expr); } return(expr.OrElse(member.IsNull())); }
public static Expression Like(this MemberExpression member, string value, bool withNull = false) { var expr = member.Contains(value); if (!withNull) { return(expr); } return(expr.OrElse(member.IsNull())); }