- Timestamp:
- 03/24/26 22:13:36 (3 months ago)
- Branches:
- main
- Children:
- 7fbb91c
- Parents:
- acf690c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ChapterX.Infrastructure/Repositories/CommentRepository.cs
racf690c r73b69b2 19 19 20 20 public async Task<IEnumerable<Comment>> GetByChapterIdAsync(int chapterId, CancellationToken cancellationToken = default) 21 { 22 return await _dbSet 23 .Where(c => c.StoryId == chapterId) 21 => await _dbSet.Where(c => c.StoryId == chapterId).ToListAsync(cancellationToken); 22 23 public async Task<IEnumerable<Comment>> GetByStoryIdAsync(int storyId, CancellationToken cancellationToken = default) 24 => await _dbSet 25 .Include(c => c.User) 26 .Where(c => c.StoryId == storyId) 27 .OrderByDescending(c => c.CreatedAt) 24 28 .ToListAsync(cancellationToken); 25 }26 29 } 27 30 }
Note:
See TracChangeset
for help on using the changeset viewer.
