File tree Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -125,19 +125,6 @@ public static bool Any(this IEnumerable source)
125125 return false ;
126126 }
127127
128- public static async Task < List < TSource > > ToListAsync < TSource > (
129- this IAsyncEnumerable < TSource > source ,
130- CancellationToken cancellationToken = default )
131- {
132- var list = new List < TSource > ( ) ;
133- await foreach ( var element in source . WithCancellation ( cancellationToken ) . ConfigureAwait ( false ) )
134- {
135- list . Add ( element ) ;
136- }
137-
138- return list ;
139- }
140-
141128 public static List < TSource > ToList < TSource > ( this IEnumerable source )
142129 => source . OfType < TSource > ( ) . ToList ( ) ;
143130
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public async Task CompiledQueryAsync_throws_when_used_with_different_models()
4545 Assert . Equal (
4646 CoreStrings . CompiledQueryDifferentModel ( "c => c.Foos" ) ,
4747 ( await Assert . ThrowsAsync < InvalidOperationException > (
48- ( ) => query ( context2 ) . ToListAsync ( ) ) ) . Message ) ;
48+ ( ) => query ( context2 ) . ToListAsync ( ) . AsTask ( ) ) ) . Message ) ;
4949
5050 _ = await query ( context1 ) . ToListAsync ( ) ;
5151 }
You can’t perform that action at this time.
0 commit comments