Skip to content

Commit 55b4865

Browse files
committed
v1.7.3
1 parent 807df3e commit 55b4865

6 files changed

Lines changed: 42 additions & 36 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# v1.7.3 (11 July 2026)
2+
- [#981](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/981) - Fix MethodFinder.FirstIsBetterThanSecond [bug] contributed by [StefH](https://github.com/StefH)
3+
- [#984](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/984) - By default, also support WellKnownTypes like StringComparer [feature] contributed by [StefH](https://github.com/StefH)
4+
- [#985](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/985) - Add some more unit tests for DynamicExpressionParser.ParseLambda [test] contributed by [StefH](https://github.com/StefH)
5+
- [#980](https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/980) - IndexOutOfRangeException in MethodFinder.FirstIsBetterThanSecond after upgrading to v1.7.2 [bug]
6+
- [#983](https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/983) - How to IEnumerable<string>.Contains(x, StringComparer.OrdinalIgnoreCase) ? [feature]
7+
18
# v1.7.2 (04 April 2026)
29
- [#971](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/971) - Fix some sonarcloud issues [refactor] contributed by [StefH](https://github.com/StefH)
310
- [#974](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/974) - Fix unhandled exceptions from malformed expression strings [bug] contributed by [Copilot](https://github.com/apps/copilot-swe-agent)

Generate-ReleaseNotes.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
rem https://github.com/StefH/GitHubReleaseNotes
22

3-
SET version=v1.7.2
3+
SET version=v1.7.3
44

55
GitHubReleaseNotes --output CHANGELOG.md --exclude-labels known_issue out_of_scope not_planned invalid question documentation wontfix environment duplicate --language en --version %version% --token %GH_TOKEN%

src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static class EntityFrameworkDynamicQueryableExtensions
5252
[PublicAPI]
5353
public static Task<bool> AllAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
5454
{
55-
return AllAsync(source, predicate, default(CancellationToken), args);
55+
return AllAsync(source, predicate, default, args);
5656
}
5757

5858
/// <summary>
@@ -74,7 +74,7 @@ public static Task<bool> AllAsync([NotNull] this IQueryable source, [NotNull] st
7474
/// A task that represents the asynchronous operation. The task result contains true if every element of the source sequence passes the test in the specified predicate; otherwise, false.
7575
/// </returns>
7676
[PublicAPI]
77-
public static Task<bool> AllAsync([NotNull] this IQueryable source, [NotNull] string predicate, CancellationToken cancellationToken = default(CancellationToken), [CanBeNull] params object[] args)
77+
public static Task<bool> AllAsync([NotNull] this IQueryable source, [NotNull] string predicate, CancellationToken cancellationToken = default, [CanBeNull] params object[] args)
7878
{
7979
Check.NotNull(source, nameof(source));
8080
Check.NotEmpty(predicate, nameof(predicate));
@@ -106,7 +106,7 @@ public static Task<bool> AllAsync([NotNull] this IQueryable source, [NotNull] st
106106
/// A task that represents the asynchronous operation. The task result contains true if the source sequence contains any elements; otherwise, false.
107107
/// </returns>
108108
[PublicAPI]
109-
public static Task<bool> AnyAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
109+
public static Task<bool> AnyAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
110110
{
111111
Check.NotNull(source, nameof(source));
112112
Check.NotNull(cancellationToken, nameof(cancellationToken));
@@ -134,7 +134,7 @@ public static Task<bool> AllAsync([NotNull] this IQueryable source, [NotNull] st
134134
[PublicAPI]
135135
public static Task<bool> AnyAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
136136
{
137-
return AnyAsync(source, predicate, default(CancellationToken), args);
137+
return AnyAsync(source, predicate, default, args);
138138
}
139139

140140
/// <summary>
@@ -156,7 +156,7 @@ public static Task<bool> AnyAsync([NotNull] this IQueryable source, [NotNull] st
156156
/// A task that represents the asynchronous operation. The task result contains true if the source sequence contains any elements; otherwise, false.
157157
/// </returns>
158158
[PublicAPI]
159-
public static Task<bool> AnyAsync([NotNull] this IQueryable source, [NotNull] string predicate, CancellationToken cancellationToken = default(CancellationToken), [CanBeNull] params object[] args)
159+
public static Task<bool> AnyAsync([NotNull] this IQueryable source, [NotNull] string predicate, CancellationToken cancellationToken = default, [CanBeNull] params object[] args)
160160
{
161161
Check.NotNull(source, nameof(source));
162162
Check.NotEmpty(predicate, nameof(predicate));
@@ -188,7 +188,7 @@ public static Task<bool> AnyAsync([NotNull] this IQueryable source, [NotNull] st
188188
/// A task that represents the asynchronous operation. The task result contains the average of the sequence of values.
189189
/// </returns>
190190
[PublicAPI]
191-
public static Task<double> AverageAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
191+
public static Task<double> AverageAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
192192
{
193193
Check.NotNull(source, nameof(source));
194194
Check.NotNull(cancellationToken, nameof(cancellationToken));
@@ -218,7 +218,7 @@ public static Task<bool> AnyAsync([NotNull] this IQueryable source, [NotNull] st
218218
[PublicAPI]
219219
public static Task<double> AverageAsync([NotNull] this IQueryable source, [NotNull] string selector, [CanBeNull] params object[] args)
220220
{
221-
return AverageAsync(source, selector, default(CancellationToken), args);
221+
return AverageAsync(source, selector, default, args);
222222
}
223223

224224
/// <summary>
@@ -242,7 +242,7 @@ public static Task<double> AverageAsync([NotNull] this IQueryable source, [NotNu
242242
/// predicate; otherwise, <c>false</c>.
243243
/// </returns>
244244
[PublicAPI]
245-
public static Task<double> AverageAsync([NotNull] this IQueryable source, [NotNull] string selector, CancellationToken cancellationToken = default(CancellationToken), [CanBeNull] params object[] args)
245+
public static Task<double> AverageAsync([NotNull] this IQueryable source, [NotNull] string selector, CancellationToken cancellationToken = default, [CanBeNull] params object[] args)
246246
{
247247
Check.NotNull(source, nameof(source));
248248
Check.NotEmpty(selector, nameof(selector));
@@ -275,7 +275,7 @@ public static Task<double> AverageAsync([NotNull] this IQueryable source, [NotNu
275275
/// The task result contains the number of elements in the input sequence.
276276
/// </returns>
277277
[PublicAPI]
278-
public static Task<int> CountAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
278+
public static Task<int> CountAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
279279
{
280280
Check.NotNull(source, nameof(source));
281281
Check.NotNull(cancellationToken, nameof(cancellationToken));
@@ -305,7 +305,7 @@ public static Task<double> AverageAsync([NotNull] this IQueryable source, [NotNu
305305
[PublicAPI]
306306
public static Task<int> CountAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
307307
{
308-
return CountAsync(source, default(CancellationToken), predicate, args);
308+
return CountAsync(source, default, predicate, args);
309309
}
310310

311311
/// <summary>
@@ -362,7 +362,7 @@ public static Task<int> CountAsync([NotNull] this IQueryable source, Cancellatio
362362
/// The task result contains the first element in <paramref name="source" />.
363363
/// </returns>
364364
[PublicAPI]
365-
public static Task<dynamic> FirstAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
365+
public static Task<dynamic> FirstAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
366366
{
367367
Check.NotNull(source, nameof(source));
368368

@@ -391,7 +391,7 @@ public static Task<int> CountAsync([NotNull] this IQueryable source, Cancellatio
391391
[PublicAPI]
392392
public static Task<dynamic> FirstAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
393393
{
394-
return FirstAsync(source, default(CancellationToken), predicate, args);
394+
return FirstAsync(source, default, predicate, args);
395395
}
396396

397397
/// <summary>
@@ -448,7 +448,7 @@ public static Task<dynamic> FirstAsync([NotNull] this IQueryable source, Cancell
448448
/// <paramref name="source" /> is empty; otherwise, the first element in <paramref name="source" />.
449449
/// </returns>
450450
[PublicAPI]
451-
public static Task<dynamic> FirstOrDefaultAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
451+
public static Task<dynamic> FirstOrDefaultAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
452452
{
453453
Check.NotNull(source, nameof(source));
454454
Check.NotNull(cancellationToken, nameof(cancellationToken));
@@ -480,7 +480,7 @@ public static Task<dynamic> FirstAsync([NotNull] this IQueryable source, Cancell
480480
[PublicAPI]
481481
public static Task<dynamic> FirstOrDefaultAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
482482
{
483-
return FirstOrDefaultAsync(source, default(CancellationToken), predicate, args);
483+
return FirstOrDefaultAsync(source, default, predicate, args);
484484
}
485485

486486
/// <summary>
@@ -539,7 +539,7 @@ public static Task<dynamic> FirstOrDefaultAsync([NotNull] this IQueryable source
539539
/// The task result contains the last element in <paramref name="source" />.
540540
/// </returns>
541541
[PublicAPI]
542-
public static Task<dynamic> LastAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
542+
public static Task<dynamic> LastAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
543543
{
544544
Check.NotNull(source, nameof(source));
545545

@@ -568,7 +568,7 @@ public static Task<dynamic> FirstOrDefaultAsync([NotNull] this IQueryable source
568568
[PublicAPI]
569569
public static Task<dynamic> LastAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
570570
{
571-
return LastAsync(source, default(CancellationToken), predicate, args);
571+
return LastAsync(source, default, predicate, args);
572572
}
573573

574574
/// <summary>
@@ -625,7 +625,7 @@ public static Task<dynamic> LastAsync([NotNull] this IQueryable source, Cancella
625625
/// <paramref name="source" /> is empty; otherwise, the last element in <paramref name="source" />.
626626
/// </returns>
627627
[PublicAPI]
628-
public static Task<dynamic> LastOrDefaultAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
628+
public static Task<dynamic> LastOrDefaultAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
629629
{
630630
Check.NotNull(source, nameof(source));
631631
Check.NotNull(cancellationToken, nameof(cancellationToken));
@@ -657,7 +657,7 @@ public static Task<dynamic> LastAsync([NotNull] this IQueryable source, Cancella
657657
[PublicAPI]
658658
public static Task<dynamic> LastOrDefaultAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
659659
{
660-
return LastOrDefaultAsync(source, default(CancellationToken), predicate, args);
660+
return LastOrDefaultAsync(source, default, predicate, args);
661661
}
662662

663663
/// <summary>
@@ -716,7 +716,7 @@ public static Task<dynamic> LastOrDefaultAsync([NotNull] this IQueryable source,
716716
/// The task result contains the number of elements in the input sequence.
717717
/// </returns>
718718
[PublicAPI]
719-
public static Task<long> LongCountAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
719+
public static Task<long> LongCountAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
720720
{
721721
Check.NotNull(source, nameof(source));
722722
Check.NotNull(cancellationToken, nameof(cancellationToken));
@@ -746,7 +746,7 @@ public static Task<dynamic> LastOrDefaultAsync([NotNull] this IQueryable source,
746746
[PublicAPI]
747747
public static Task<long> LongCountAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
748748
{
749-
return LongCountAsync(source, default(CancellationToken), predicate, args);
749+
return LongCountAsync(source, default, predicate, args);
750750
}
751751

752752
/// <summary>
@@ -803,7 +803,7 @@ public static Task<long> LongCountAsync([NotNull] this IQueryable source, Cancel
803803
/// A task that represents the asynchronous operation. The task result contains the single element of the input sequence that satisfies the condition in predicate.
804804
/// </returns>
805805
[PublicAPI]
806-
public static Task<dynamic> SingleOrDefaultAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
806+
public static Task<dynamic> SingleOrDefaultAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
807807
{
808808
Check.NotNull(source, nameof(source));
809809
Check.NotNull(cancellationToken, nameof(cancellationToken));
@@ -832,7 +832,7 @@ public static Task<long> LongCountAsync([NotNull] this IQueryable source, Cancel
832832
[PublicAPI]
833833
public static Task<dynamic> SingleOrDefaultAsync([NotNull] this IQueryable source, [NotNull] string predicate, [CanBeNull] params object[] args)
834834
{
835-
return SingleOrDefaultAsync(source, default(CancellationToken), predicate, args);
835+
return SingleOrDefaultAsync(source, default, predicate, args);
836836
}
837837

838838
/// <summary>
@@ -886,7 +886,7 @@ public static Task<dynamic> SingleOrDefaultAsync([NotNull] this IQueryable sourc
886886
/// The task result contains sum of the values in the sequence.
887887
/// </returns>
888888
[PublicAPI]
889-
public static Task<dynamic> SumAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
889+
public static Task<dynamic> SumAsync([NotNull] this IQueryable source, CancellationToken cancellationToken = default)
890890
{
891891
Check.NotNull(source, nameof(source));
892892
Check.NotNull(cancellationToken, nameof(cancellationToken));
@@ -916,7 +916,7 @@ public static Task<dynamic> SingleOrDefaultAsync([NotNull] this IQueryable sourc
916916
[PublicAPI]
917917
public static Task<dynamic> SumAsync([NotNull] this IQueryable source, [NotNull] string selector, [CanBeNull] params object[] args)
918918
{
919-
return SumAsync(source, default(CancellationToken), selector, args);
919+
return SumAsync(source, default, selector, args);
920920
}
921921

922922
/// <summary>
@@ -963,7 +963,7 @@ public static Task<dynamic> SumAsync([NotNull] this IQueryable source, Cancellat
963963
.GetMethod(nameof(ExecuteAsync), BindingFlags.Static | BindingFlags.NonPublic, null, new[] { typeof(MethodInfo), typeof(IQueryable), typeof(CancellationToken) }, null);
964964
#endif
965965

966-
private static Task<dynamic> ExecuteDynamicAsync(MethodInfo operatorMethodInfo, IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
966+
private static Task<dynamic> ExecuteDynamicAsync(MethodInfo operatorMethodInfo, IQueryable source, CancellationToken cancellationToken = default)
967967
{
968968
var executeAsyncMethod = _executeAsyncMethod.MakeGenericMethod(operatorMethodInfo.ReturnType);
969969

@@ -973,7 +973,7 @@ public static Task<dynamic> SumAsync([NotNull] this IQueryable source, Cancellat
973973
return castedTask;
974974
}
975975

976-
private static Task<TResult> ExecuteAsync<TResult>(MethodInfo operatorMethodInfo, IQueryable source, CancellationToken cancellationToken = default(CancellationToken))
976+
private static Task<TResult> ExecuteAsync<TResult>(MethodInfo operatorMethodInfo, IQueryable source, CancellationToken cancellationToken = default)
977977
{
978978
#if EFCORE
979979
var provider = source.Provider as IAsyncQueryProvider;
@@ -1002,7 +1002,7 @@ public static Task<dynamic> SumAsync([NotNull] this IQueryable source, Cancellat
10021002
throw new InvalidOperationException(Res.IQueryableProviderNotAsync);
10031003
}
10041004

1005-
private static Task<TResult> ExecuteAsync<TResult>(MethodInfo operatorMethodInfo, IQueryable source, LambdaExpression expression, CancellationToken cancellationToken = default(CancellationToken))
1005+
private static Task<TResult> ExecuteAsync<TResult>(MethodInfo operatorMethodInfo, IQueryable source, LambdaExpression expression, CancellationToken cancellationToken = default)
10061006
=> ExecuteAsync<TResult>(operatorMethodInfo, source, Expression.Quote(expression), cancellationToken);
10071007

10081008
private static readonly MethodInfo _executeAsyncMethodWithExpression =
@@ -1014,7 +1014,7 @@ public static Task<dynamic> SumAsync([NotNull] this IQueryable source, Cancellat
10141014
.GetMethod(nameof(ExecuteAsync), BindingFlags.Static | BindingFlags.NonPublic, null, new[] { typeof(MethodInfo), typeof(IQueryable), typeof(Expression), typeof(CancellationToken) }, null);
10151015
#endif
10161016

1017-
private static Task<dynamic> ExecuteDynamicAsync(MethodInfo operatorMethodInfo, IQueryable source, Expression expression, CancellationToken cancellationToken = default(CancellationToken))
1017+
private static Task<dynamic> ExecuteDynamicAsync(MethodInfo operatorMethodInfo, IQueryable source, Expression expression, CancellationToken cancellationToken = default)
10181018
{
10191019
var executeAsyncMethod = _executeAsyncMethodWithExpression.MakeGenericMethod(operatorMethodInfo.ReturnType);
10201020

@@ -1024,7 +1024,7 @@ public static Task<dynamic> SumAsync([NotNull] this IQueryable source, Cancellat
10241024
return castedTask;
10251025
}
10261026

1027-
private static Task<TResult> ExecuteAsync<TResult>(MethodInfo operatorMethodInfo, IQueryable source, Expression expression, CancellationToken cancellationToken = default(CancellationToken))
1027+
private static Task<TResult> ExecuteAsync<TResult>(MethodInfo operatorMethodInfo, IQueryable source, Expression expression, CancellationToken cancellationToken = default)
10281028
{
10291029
#if EFCORE
10301030
var provider = source.Provider as IAsyncQueryProvider;
@@ -1081,7 +1081,7 @@ private static IQueryable CastSource(IQueryable source, MethodInfo operatorMetho
10811081
return source;
10821082
}
10831083

1084-
private static Task<TResult> ExecuteAsync<TResult>(IAsyncQueryProvider provider, Expression expression, CancellationToken cancellationToken = default(CancellationToken))
1084+
private static Task<TResult> ExecuteAsync<TResult>(IAsyncQueryProvider provider, Expression expression, CancellationToken cancellationToken = default)
10851085
{
10861086
if (typeof(TResult) == typeof(object) && expression.Type != typeof(object))
10871087
{

0 commit comments

Comments
 (0)