forked from ZEXSM/OData.QueryBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support reusing Expressions between filters on the expand level and a…
…ny/all conditions on the root level. Possible breaking: Changed the All and Any methods to take Expression<Func<T, bool>> instead of Func<T, bool>. As far as I can tell this does not impact anything since explicitly passing a non-null Func<T, bool> previously was unsupported. fixes ZEXSM#123
- Loading branch information
1 parent
62efe8b
commit 10e248f
Showing
3 changed files
with
122 additions
and
65 deletions.
There are no files selected for viewing
7 changes: 4 additions & 3 deletions
7
src/OData.QueryBuilder/Conventions/Operators/IODataOperator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq.Expressions; | ||
|
||
namespace OData.QueryBuilder.Conventions.Operators | ||
{ | ||
public interface IODataOperator | ||
{ | ||
bool In<T>(T columnName, IEnumerable<T> values); | ||
|
||
bool All<T>(IEnumerable<T> columnName, Func<T, bool> func); | ||
bool All<T>(IEnumerable<T> columnName, Expression<Func<T, bool>> func); | ||
|
||
bool Any<T>(IEnumerable<T> columnName); | ||
|
||
bool Any<T>(IEnumerable<T> columnName, Func<T, bool> func); | ||
bool Any<T>(IEnumerable<T> columnName, Expression<Func<T, bool>> func); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters