File tree 2 files changed +1
-14
lines changed
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)
125
125
return false ;
126
126
}
127
127
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
-
141
128
public static List < TSource > ToList < TSource > ( this IEnumerable source )
142
129
=> source . OfType < TSource > ( ) . ToList ( ) ;
143
130
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public async Task CompiledQueryAsync_throws_when_used_with_different_models()
45
45
Assert . Equal (
46
46
CoreStrings . CompiledQueryDifferentModel ( "c => c.Foos" ) ,
47
47
( await Assert . ThrowsAsync < InvalidOperationException > (
48
- ( ) => query ( context2 ) . ToListAsync ( ) ) ) . Message ) ;
48
+ ( ) => query ( context2 ) . ToListAsync ( ) . AsTask ( ) ) ) . Message ) ;
49
49
50
50
_ = await query ( context1 ) . ToListAsync ( ) ;
51
51
}
You can’t perform that action at this time.
0 commit comments