File tree 1 file changed +21
-2
lines changed
src/NHibernate.Test/Async/Linq/ByMethod 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,29 @@ public async Task AnyWithCountAsync()
62
62
}
63
63
64
64
[ Test ]
65
- public async Task AnyWithFetchAsync ( )
65
+ public void AnyWithFetchAsync ( )
66
66
{
67
67
//NH-3241
68
- var result = await ( db . Orders . Fetch ( x => x . Customer ) . FetchMany ( x => x . OrderLines ) . AnyAsync ( ) ) ;
68
+ Assert . DoesNotThrowAsync ( async ( ) =>
69
+ {
70
+ var result = await ( db . Orders . Fetch ( x => x . Customer ) . FetchMany ( x => x . OrderLines ) . AnyAsync ( ) ) ;
71
+ }
72
+ ) ;
73
+ }
74
+
75
+ [ Test ]
76
+ public void AnyWithFetchInSubQueryAsync ( )
77
+ {
78
+ Assert . DoesNotThrowAsync ( async ( ) =>
79
+ {
80
+ var result = await ( db . Orders
81
+ . Where ( x => x . Customer . CustomerId == "Test" )
82
+ . Fetch ( x => x . Customer )
83
+ . FetchMany ( x => x . OrderLines )
84
+ . Where ( x => x . Freight > 1 )
85
+ . CountAsync ( ) ) ;
86
+ }
87
+ ) ;
69
88
}
70
89
}
71
90
}
You can’t perform that action at this time.
0 commit comments