From f146c00ac4222f96e102384919608a0352ac058c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Leb=C3=A9e?= Date: Wed, 14 Mar 2018 18:17:25 -0500 Subject: [PATCH] renamed to better names. --- .../Extensions/DbContextExtensions.cs | 8 +- .../ComplexQueriesTests.cs | 4 +- .../Extensions/EnumerableExtensions.cs | 4 +- .../Extensions/QueryableExtensions.cs | 16 ++-- .../OrderByBuilder.cs} | 16 ++-- .../OrderByPart.cs} | 2 +- .../QueryBuilderCondition.cs} | 4 +- .../WhereBuilder.cs} | 16 ++-- .../WhereBuilderBase.cs} | 18 ++--- .../WhereBuilderBase.shortcuts.cs} | 76 +++++++++---------- 10 files changed, 82 insertions(+), 82 deletions(-) rename PoweredSoft.DynamicLinq/Fluent/{Sort/SortBuilder.cs => OrderBy/OrderByBuilder.cs} (83%) rename PoweredSoft.DynamicLinq/Fluent/{Sort/QueryBuilderSort.cs => OrderBy/OrderByPart.cs} (91%) rename PoweredSoft.DynamicLinq/Fluent/{QueryBuilder/QueryBuilderFilter.cs => WhereBuilder/QueryBuilderCondition.cs} (80%) rename PoweredSoft.DynamicLinq/Fluent/{QueryBuilder/QueryBuilder.cs => WhereBuilder/WhereBuilder.cs} (84%) rename PoweredSoft.DynamicLinq/Fluent/{QueryBuilder/QueryBuilderBase.cs => WhereBuilder/WhereBuilderBase.cs} (72%) rename PoweredSoft.DynamicLinq/Fluent/{QueryBuilder/QueryBuilderBase.shortcuts.cs => WhereBuilder/WhereBuilderBase.shortcuts.cs} (85%) diff --git a/PoweredSoft.DynamicLinq.EntityFramework/Extensions/DbContextExtensions.cs b/PoweredSoft.DynamicLinq.EntityFramework/Extensions/DbContextExtensions.cs index f0d7a9a..daab0e4 100644 --- a/PoweredSoft.DynamicLinq.EntityFramework/Extensions/DbContextExtensions.cs +++ b/PoweredSoft.DynamicLinq.EntityFramework/Extensions/DbContextExtensions.cs @@ -15,7 +15,7 @@ namespace PoweredSoft.DynamicLinq.EntityFramework .GetMethods(BindingFlags.Static | BindingFlags.Public) .First(t => t.Name == "Query" && t.IsGenericMethod); - public static IQueryable Query(this DbContext context, Type pocoType, Action callback) + public static IQueryable Query(this DbContext context, Type pocoType, Action callback) { var method = QueryMethod.MakeGenericMethod(pocoType); var invokeResult = method.Invoke(null, new object[] {context, callback}); @@ -23,7 +23,7 @@ namespace PoweredSoft.DynamicLinq.EntityFramework return ret; } - public static IQueryable Query(this DbContext context, Action callback) + public static IQueryable Query(this DbContext context, Action callback) where T : class { var query = context.Set().AsQueryable(); @@ -31,10 +31,10 @@ namespace PoweredSoft.DynamicLinq.EntityFramework return query; } - public static IQueryable Where(this DbContext context, Type pocoType, Action callback) + public static IQueryable Where(this DbContext context, Type pocoType, Action callback) => context.Query(pocoType, callback); - public static IQueryable Where(this DbContext context, Action callback) + public static IQueryable Where(this DbContext context, Action callback) where T : class => context.Query(callback); } } diff --git a/PoweredSoft.DynamicLinq.Test/ComplexQueriesTests.cs b/PoweredSoft.DynamicLinq.Test/ComplexQueriesTests.cs index 0adf24d..91e7e0b 100644 --- a/PoweredSoft.DynamicLinq.Test/ComplexQueriesTests.cs +++ b/PoweredSoft.DynamicLinq.Test/ComplexQueriesTests.cs @@ -56,7 +56,7 @@ namespace PoweredSoft.DynamicLinq.Test // the query. var query = posts.AsQueryable(); - var queryBuilder = new QueryBuilder(query); + var queryBuilder = new WhereBuilder(query); queryBuilder.Compare("AuthorId", ConditionOperators.Equal, 1); queryBuilder.And(subQuery => @@ -82,7 +82,7 @@ namespace PoweredSoft.DynamicLinq.Test // the query. var query = posts.AsQueryable(); - var queryBuilder = new PoweredSoft.DynamicLinq.Fluent.SortBuilder(query); + var queryBuilder = new PoweredSoft.DynamicLinq.Fluent.OrderByBuilder(query); // add some sorting. queryBuilder diff --git a/PoweredSoft.DynamicLinq/Extensions/EnumerableExtensions.cs b/PoweredSoft.DynamicLinq/Extensions/EnumerableExtensions.cs index 29cd9c6..2e8a851 100644 --- a/PoweredSoft.DynamicLinq/Extensions/EnumerableExtensions.cs +++ b/PoweredSoft.DynamicLinq/Extensions/EnumerableExtensions.cs @@ -14,10 +14,10 @@ namespace PoweredSoft.DynamicLinq QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => list.AsQueryable().Where(path, conditionOperator, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public static IEnumerable Where(this IEnumerable list, Action> callback) + public static IEnumerable Where(this IEnumerable list, Action> callback) => list.Query(callback); - public static IEnumerable Query(this IEnumerable list, Action> callback) + public static IEnumerable Query(this IEnumerable list, Action> callback) => list.AsQueryable().Query(callback); public static IEnumerable Sort(this IEnumerable list, string path, QuerySortDirection sortDirection, bool appendSort) diff --git a/PoweredSoft.DynamicLinq/Extensions/QueryableExtensions.cs b/PoweredSoft.DynamicLinq/Extensions/QueryableExtensions.cs index 3c8c78b..372c522 100644 --- a/PoweredSoft.DynamicLinq/Extensions/QueryableExtensions.cs +++ b/PoweredSoft.DynamicLinq/Extensions/QueryableExtensions.cs @@ -19,12 +19,12 @@ namespace PoweredSoft.DynamicLinq return query; } - public static IQueryable Where(this IQueryable query, Action> callback) + public static IQueryable Where(this IQueryable query, Action> callback) => query.Query(callback); - public static IQueryable Query (this IQueryable query, Action> callback) + public static IQueryable Query (this IQueryable query, Action> callback) { - var queryBuilder = new QueryBuilder(query); + var queryBuilder = new WhereBuilder(query); callback(queryBuilder); var ret = queryBuilder.Build(); return ret; @@ -32,7 +32,7 @@ namespace PoweredSoft.DynamicLinq public static IQueryable Sort(this IQueryable query, string path, QuerySortDirection sortDirection, bool appendSort) { - var qb = new SortBuilder(query); + var qb = new OrderByBuilder(query); qb.Sort(path, sortDirection, appendSort); var ret = qb.Build(); return ret; @@ -40,7 +40,7 @@ namespace PoweredSoft.DynamicLinq public static IQueryable OrderBy(this IQueryable query, string path) { - var qb = new SortBuilder(query); + var qb = new OrderByBuilder(query); qb.OrderBy(path); var ret = qb.Build(); return ret; @@ -48,7 +48,7 @@ namespace PoweredSoft.DynamicLinq public static IQueryable OrderByDescending(this IQueryable query, string path) { - var qb = new SortBuilder(query); + var qb = new OrderByBuilder(query); qb.OrderByDescending(path); var ret = qb.Build(); return ret; @@ -56,7 +56,7 @@ namespace PoweredSoft.DynamicLinq public static IQueryable ThenBy(this IQueryable query, string path) { - var qb = new SortBuilder(query); + var qb = new OrderByBuilder(query); qb.ThenBy(path); var ret = qb.Build(); return ret; @@ -64,7 +64,7 @@ namespace PoweredSoft.DynamicLinq public static IQueryable ThenByDescending(this IQueryable query, string path) { - var qb = new SortBuilder(query); + var qb = new OrderByBuilder(query); qb.ThenByDescending(path); var ret = qb.Build(); return ret; diff --git a/PoweredSoft.DynamicLinq/Fluent/Sort/SortBuilder.cs b/PoweredSoft.DynamicLinq/Fluent/OrderBy/OrderByBuilder.cs similarity index 83% rename from PoweredSoft.DynamicLinq/Fluent/Sort/SortBuilder.cs rename to PoweredSoft.DynamicLinq/Fluent/OrderBy/OrderByBuilder.cs index 4c4da58..f3a3192 100644 --- a/PoweredSoft.DynamicLinq/Fluent/Sort/SortBuilder.cs +++ b/PoweredSoft.DynamicLinq/Fluent/OrderBy/OrderByBuilder.cs @@ -8,11 +8,11 @@ namespace PoweredSoft.DynamicLinq.Fluent { public class SortBuilderBase { - public List Sorts { get; protected set; } = new List(); + public List Sorts { get; protected set; } = new List(); public virtual SortBuilderBase Sort(string path, QuerySortDirection sortDirection, bool appendSort) { - Sorts.Add(new QueryBuilderSort + Sorts.Add(new OrderByPart { Path = path, sortDirection = sortDirection, @@ -24,7 +24,7 @@ namespace PoweredSoft.DynamicLinq.Fluent public virtual SortBuilderBase OrderBy(string path) { Sorts.Clear(); - Sorts.Add(new QueryBuilderSort + Sorts.Add(new OrderByPart { Path = path, sortDirection = QuerySortDirection.Ascending, @@ -36,7 +36,7 @@ namespace PoweredSoft.DynamicLinq.Fluent public virtual SortBuilderBase OrderByDescending(string path) { Sorts.Clear(); - Sorts.Add(new QueryBuilderSort + Sorts.Add(new OrderByPart { Path = path, sortDirection = QuerySortDirection.Descending, @@ -47,7 +47,7 @@ namespace PoweredSoft.DynamicLinq.Fluent public virtual SortBuilderBase ThenBy(string path) { - Sorts.Add(new QueryBuilderSort + Sorts.Add(new OrderByPart { Path = path, sortDirection = QuerySortDirection.Ascending, @@ -58,7 +58,7 @@ namespace PoweredSoft.DynamicLinq.Fluent public virtual SortBuilderBase ThenByDescending(string path) { - Sorts.Add(new QueryBuilderSort + Sorts.Add(new OrderByPart { Path = path, sortDirection = QuerySortDirection.Descending, @@ -68,11 +68,11 @@ namespace PoweredSoft.DynamicLinq.Fluent } } - public class SortBuilder : SortBuilderBase + public class OrderByBuilder : SortBuilderBase { public IQueryable Query { get; } - public SortBuilder(IQueryable query) + public OrderByBuilder(IQueryable query) { Query = query; } diff --git a/PoweredSoft.DynamicLinq/Fluent/Sort/QueryBuilderSort.cs b/PoweredSoft.DynamicLinq/Fluent/OrderBy/OrderByPart.cs similarity index 91% rename from PoweredSoft.DynamicLinq/Fluent/Sort/QueryBuilderSort.cs rename to PoweredSoft.DynamicLinq/Fluent/OrderBy/OrderByPart.cs index a41aa96..0055479 100644 --- a/PoweredSoft.DynamicLinq/Fluent/Sort/QueryBuilderSort.cs +++ b/PoweredSoft.DynamicLinq/Fluent/OrderBy/OrderByPart.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace PoweredSoft.DynamicLinq.Fluent { - public class QueryBuilderSort + public class OrderByPart { public string Path { get; set; } diff --git a/PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderFilter.cs b/PoweredSoft.DynamicLinq/Fluent/WhereBuilder/QueryBuilderCondition.cs similarity index 80% rename from PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderFilter.cs rename to PoweredSoft.DynamicLinq/Fluent/WhereBuilder/QueryBuilderCondition.cs index a740d11..48ecc3b 100644 --- a/PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderFilter.cs +++ b/PoweredSoft.DynamicLinq/Fluent/WhereBuilder/QueryBuilderCondition.cs @@ -6,14 +6,14 @@ using System.Threading.Tasks; namespace PoweredSoft.DynamicLinq.Fluent { - public class QueryBuilderFilter + public class WhereBuilderCondition { public string Path { get; set; } public ConditionOperators ConditionOperator { get; set; } public object Value { get; set; } public bool And { get; set; } public QueryConvertStrategy ConvertStrategy { get; set; } - public List Filters { get; set; } = new List(); + public List Conditions { get; set; } = new List(); public QueryCollectionHandling CollectionHandling { get; set; } public StringComparison? StringComparisation { get; set; } = null; } diff --git a/PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilder.cs b/PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilder.cs similarity index 84% rename from PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilder.cs rename to PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilder.cs index 19bf314..6a62811 100644 --- a/PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilder.cs +++ b/PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilder.cs @@ -8,11 +8,11 @@ using System.Threading.Tasks; namespace PoweredSoft.DynamicLinq.Fluent { - public class QueryBuilder : QueryBuilderBase + public class WhereBuilder : WhereBuilderBase { public IQueryable Query { get; set; } - public QueryBuilder(IQueryable query) + public WhereBuilder(IQueryable query) { Query = query; } @@ -37,7 +37,7 @@ namespace PoweredSoft.DynamicLinq.Fluent return query; } - protected virtual Expression> BuildFilterExpression(ParameterExpression parameter, List filters) + protected virtual Expression> BuildFilterExpression(ParameterExpression parameter, List filters) { Expression> temp = null; @@ -46,8 +46,8 @@ namespace PoweredSoft.DynamicLinq.Fluent filters.ForEach(filter => { Expression> innerExpression; - if (filter.Filters?.Any() == true) - innerExpression = BuildFilterExpression(parameter, filter.Filters); + if (filter.Conditions?.Any() == true) + innerExpression = BuildFilterExpression(parameter, filter.Conditions); else innerExpression = BuildFilterExpression(parameter, filter); @@ -68,7 +68,7 @@ namespace PoweredSoft.DynamicLinq.Fluent return temp; } - protected virtual Expression> BuildFilterExpression(ParameterExpression parameter, QueryBuilderFilter filter) + protected virtual Expression> BuildFilterExpression(ParameterExpression parameter, WhereBuilderCondition filter) { var ret = QueryableHelpers.CreateFilterExpression( filter.Path, @@ -84,9 +84,9 @@ namespace PoweredSoft.DynamicLinq.Fluent return ret; } - protected override QueryBuilderBase GetSubQueryBuilder() + protected override WhereBuilderBase GetSubQueryBuilder() { - return new QueryBuilder(Query); + return new WhereBuilder(Query); } } } diff --git a/PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderBase.cs b/PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilderBase.cs similarity index 72% rename from PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderBase.cs rename to PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilderBase.cs index da87ea7..c6dc93f 100644 --- a/PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderBase.cs +++ b/PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilderBase.cs @@ -7,23 +7,23 @@ using System.Threading.Tasks; namespace PoweredSoft.DynamicLinq.Fluent { - public abstract partial class QueryBuilderBase + public abstract partial class WhereBuilderBase { public bool IsNullCheckingEnabled { get; protected set; } = false; - public List Filters { get; protected set; } = new List(); + public List Filters { get; protected set; } = new List(); - public virtual QueryBuilderBase NullChecking(bool check = true) + public virtual WhereBuilderBase NullChecking(bool check = true) { IsNullCheckingEnabled = check; return this; } - public virtual QueryBuilderBase Compare(string path, ConditionOperators conditionOperators, object value, + public virtual WhereBuilderBase Compare(string path, ConditionOperators conditionOperators, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, bool and = true, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) { - Filters.Add(new QueryBuilderFilter + Filters.Add(new WhereBuilderCondition { And = and, ConditionOperator = conditionOperators, @@ -37,9 +37,9 @@ namespace PoweredSoft.DynamicLinq.Fluent return this; } - protected abstract QueryBuilderBase GetSubQueryBuilder(); + protected abstract WhereBuilderBase GetSubQueryBuilder(); - public virtual QueryBuilderBase SubQuery(Action subQuery, bool and = true) + public virtual WhereBuilderBase SubQuery(Action subQuery, bool and = true) { // create query builder for same type. var qb = GetSubQueryBuilder(); @@ -49,9 +49,9 @@ namespace PoweredSoft.DynamicLinq.Fluent subQuery(qb); // create a query part. - var part = new QueryBuilderFilter(); + var part = new WhereBuilderCondition(); part.And = and; - part.Filters = qb.Filters; + part.Conditions = qb.Filters; Filters.Add(part); //return self. diff --git a/PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderBase.shortcuts.cs b/PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilderBase.shortcuts.cs similarity index 85% rename from PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderBase.shortcuts.cs rename to PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilderBase.shortcuts.cs index 5951901..8a42db5 100644 --- a/PoweredSoft.DynamicLinq/Fluent/QueryBuilder/QueryBuilderBase.shortcuts.cs +++ b/PoweredSoft.DynamicLinq/Fluent/WhereBuilder/WhereBuilderBase.shortcuts.cs @@ -4,140 +4,140 @@ using System.Text; namespace PoweredSoft.DynamicLinq.Fluent { - public abstract partial class QueryBuilderBase + public abstract partial class WhereBuilderBase { - public QueryBuilderBase And(string path, ConditionOperators conditionOperator, object value, + public WhereBuilderBase And(string path, ConditionOperators conditionOperator, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Compare(path, conditionOperator, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, and: true, stringComparision: stringComparision); - public QueryBuilderBase Or(string path, ConditionOperators conditionOperator, object value, + public WhereBuilderBase Or(string path, ConditionOperators conditionOperator, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Compare(path, conditionOperator, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, and: false, stringComparision: stringComparision); - public QueryBuilderBase And(Action subQuery) + public WhereBuilderBase And(Action subQuery) => SubQuery(subQuery, true); - public QueryBuilderBase Or(Action subQuery) + public WhereBuilderBase Or(Action subQuery) => SubQuery(subQuery, false); #region equal - public QueryBuilderBase Equal(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase Equal(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.Equal, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase AndEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase AndEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.Equal, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase OrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase OrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Or(path, ConditionOperators.Equal, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); #endregion #region not equal - public QueryBuilderBase NotEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase NotEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.NotEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase AndNotEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase AndNotEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.NotEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase OrNotEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase OrNotEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Or(path, ConditionOperators.NotEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); #endregion #region GreaterThan - public QueryBuilderBase GreaterThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase GreaterThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => And(path, ConditionOperators.GreaterThan, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); - public QueryBuilderBase AndGreaterThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase AndGreaterThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => And(path, ConditionOperators.GreaterThan, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); - public QueryBuilderBase OrGreaterThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase OrGreaterThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => Or(path, ConditionOperators.GreaterThan, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); #endregion #region GreaterThanOrEqual - public QueryBuilderBase GreaterThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase GreaterThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => And(path, ConditionOperators.GreaterThanOrEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); - public QueryBuilderBase AndGreaterThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase AndGreaterThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => And(path, ConditionOperators.GreaterThanOrEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); - public QueryBuilderBase OrGreaterThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase OrGreaterThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => Or(path, ConditionOperators.GreaterThanOrEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); #endregion #region LessThan - public QueryBuilderBase LessThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase LessThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => And(path, ConditionOperators.LessThan, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); - public QueryBuilderBase AndLessThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase AndLessThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => And(path, ConditionOperators.LessThan, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); - public QueryBuilderBase OrLessThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase OrLessThan(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => Or(path, ConditionOperators.LessThan, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); #endregion #region LessThanOrEqual - public QueryBuilderBase LessThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase LessThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => And(path, ConditionOperators.LessThanOrEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); - public QueryBuilderBase AndLessThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase AndLessThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => And(path, ConditionOperators.LessThanOrEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); - public QueryBuilderBase OrLessThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) + public WhereBuilderBase OrLessThanOrEqual(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any) => Or(path, ConditionOperators.LessThanOrEqual, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling); #endregion #region contains - public QueryBuilderBase Contains(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase Contains(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.Contains, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase AndContains(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase AndContains(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.Contains, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase OrContains(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase OrContains(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Or(path, ConditionOperators.Contains, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); #endregion #region starts with - public QueryBuilderBase StartsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase StartsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.StartsWith, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase AndStartsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase AndStartsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.StartsWith, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase OrStartsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase OrStartsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Or(path, ConditionOperators.StartsWith, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); #endregion #region ends with - public QueryBuilderBase EndsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase EndsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.EndsWith, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase AndEndsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase AndEndsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.EndsWith, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase OrEndsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase OrEndsWith(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Or(path, ConditionOperators.EndsWith, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); #endregion #region In - public QueryBuilderBase In(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase In(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.In, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase AndIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase AndIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.In, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase OrIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase OrIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Or(path, ConditionOperators.In, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); #endregion #region NotIn - public QueryBuilderBase NotIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase NotIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.NotIn, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase AndNotIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase AndNotIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => And(path, ConditionOperators.NotIn, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); - public QueryBuilderBase OrNotIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) + public WhereBuilderBase OrNotIn(string path, object value, QueryConvertStrategy convertStrategy = QueryConvertStrategy.ConvertConstantToComparedPropertyOrField, QueryCollectionHandling collectionHandling = QueryCollectionHandling.Any, StringComparison? stringComparision = null) => Or(path, ConditionOperators.NotIn, value, convertStrategy: convertStrategy, collectionHandling: collectionHandling, stringComparision: stringComparision); #endregion }