From 133728fd2816fff52c7be4f7764e5a7c66382e4b Mon Sep 17 00:00:00 2001 From: David Lebee Date: Wed, 17 Oct 2018 19:40:07 -0500 Subject: [PATCH] was missing non generic. --- .../Extensions/QueryableExtensions.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/PoweredSoft.DynamicLinq/Extensions/QueryableExtensions.cs b/PoweredSoft.DynamicLinq/Extensions/QueryableExtensions.cs index 6e2d8f5..868217b 100644 --- a/PoweredSoft.DynamicLinq/Extensions/QueryableExtensions.cs +++ b/PoweredSoft.DynamicLinq/Extensions/QueryableExtensions.cs @@ -19,6 +19,14 @@ namespace PoweredSoft.DynamicLinq return query; } + public static IQueryable Where(this IQueryable query, string path, ConditionOperators conditionOperator, object value, + QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, + QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + { + query = query.Query(qb => qb.Compare(path, conditionOperator, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision)); + return query; + } + public static IQueryable Where(this IQueryable query, Action callback) => query.Query(callback); @@ -30,6 +38,18 @@ namespace PoweredSoft.DynamicLinq return (IQueryable)ret; } + // non generics were missing. + public static IQueryable Where(this IQueryable query, Action callback) + => query.Query(callback); + + public static IQueryable Query(this IQueryable query, Action callback) + { + var queryBuilder = new WhereBuilder(query); + callback(queryBuilder); + var ret = queryBuilder.Build(); + return ret; + } + // generic. public static IQueryable OrderBy(this IQueryable query, string path, QueryOrderByDirection direction, bool append) {