File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
server/StrDss.Data/Repositories Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -236,19 +236,25 @@ await _dbSet.AsNoTracking()
236
236
237
237
_logger . LogInformation ( $ "Get Grouped Listings (all listings) - Count: { listings . Count } , Time: { stopwatch . Elapsed . TotalSeconds } seconds") ;
238
238
239
- stopwatch . Restart ( ) ;
240
-
241
239
group . NightsBookedYtdQty = 0 ;
242
240
243
241
foreach ( var listing in listings )
244
242
{
243
+ stopwatch . Restart ( ) ;
244
+
245
245
await SetExtraProperties ( listing ) ;
246
246
247
247
listing . Filtered = filteredIdSet . Contains ( listing . RentalListingId ?? 0 ) ;
248
248
249
249
group . NightsBookedYtdQty += listing . NightsBookedYtdQty ?? 0 ;
250
+
251
+ stopwatch . Stop ( ) ;
252
+
253
+ _logger . LogInformation ( $ "Get Grouped Listings (extra properties) - Count: { listings . Count } , Time: { stopwatch . Elapsed . TotalSeconds } seconds") ;
250
254
}
251
255
256
+ stopwatch . Restart ( ) ;
257
+
252
258
var lastActionDtm = listings . Max ( x => x . LastActionDtm ) ;
253
259
254
260
var listingWithLatestAction = listings . FirstOrDefault ( x => x . LastActionDtm == lastActionDtm ) ;
@@ -263,7 +269,7 @@ await _dbSet.AsNoTracking()
263
269
264
270
stopwatch . Stop ( ) ;
265
271
266
- _logger . LogInformation ( $ "Get Grouped Listings (extra properties) - Count: { listings . Count } , Time: { stopwatch . Elapsed . TotalSeconds } seconds") ;
272
+ _logger . LogInformation ( $ "Get Grouped Listings (group header properties) - Time: { stopwatch . Elapsed . TotalSeconds } seconds") ;
267
273
268
274
return listings ;
269
275
}
You can’t perform that action at this time.
0 commit comments