- Timestamp:
- 06/24/26 16:28:50 (11 days ago)
- Branches:
- main
- Children:
- a8f4a2d
- Parents:
- 0b502c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ChapterX.Infrastructure/Repositories/ChapterRepository.cs
r0b502c2 r99c1e45 31 31 .FirstOrDefaultAsync(c => c.Id == id, cancellationToken); 32 32 } 33 34 public async Task IncrementViewCountAsync(int id, CancellationToken cancellationToken = default) 35 { 36 await _dbSet 37 .Where(c => c.Id == id) 38 .ExecuteUpdateAsync(s => s.SetProperty(c => c.ViewCount, c => c.ViewCount + 1), cancellationToken); 39 } 33 40 } 34 41 }
Note:
See TracChangeset
for help on using the changeset viewer.
