File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
samples/core/Miscellaneous/NewInEFCore9 Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -215,17 +215,17 @@ async Task<List<Post>> GetPostsForceConstantCollection(int[] ids)
215215 Console . WriteLine ( ) ;
216216 Console . WriteLine ( "Aggregate over subquery/aggregate:" ) ;
217217 Console . WriteLine ( ) ;
218- // </ AggregateOverSubquery>
219- var latestPostsAverageRatingByLanguage = await context . Blogs .
220- Select ( x => new
218+ #region AggregateOverSubquery
219+ var latestPostsAverageRatingByLanguage = await context . Blogs
220+ . Select ( x => new
221221 {
222222 x . Language ,
223- LatestPostRating = x . Posts . OrderByDescending ( xx => xx . PublishedOn ) . FirstOrDefault ( ) . Rating
223+ LatestPostRating = x . Posts . OrderByDescending ( xx => xx . PublishedOn ) . FirstOrDefault ( ) ! . Rating
224224 } )
225225 . GroupBy ( x => x . Language )
226226 . Select ( x => x . Average ( xx => xx . LatestPostRating ) )
227227 . ToListAsync ( ) ;
228- // </AggregateOverSubquery>
228+ #endregion
229229
230230 // Max over decimal is not supported on Sqlite
231231 if ( ! context . UseSqlite )
You can’t perform that action at this time.
0 commit comments