- 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/ReadingListItemsRepository.cs
racf690c r73b69b2 14 14 public async Task<bool> ExistsAsync(int listId, int storyId, CancellationToken cancellationToken = default) 15 15 => await _dbSet.AnyAsync(i => i.ListId == listId && i.StoryId == storyId, cancellationToken); 16 17 public async Task<bool> DeleteByListAndStoryAsync(int listId, int storyId, CancellationToken cancellationToken = default) 18 { 19 var item = await _dbSet.FirstOrDefaultAsync(i => i.ListId == listId && i.StoryId == storyId, cancellationToken); 20 if (item == null) return false; 21 _dbSet.Remove(item); 22 await _context.SaveChangesAsync(cancellationToken); 23 return true; 24 } 16 25 } 17 26 }
Note:
See TracChangeset
for help on using the changeset viewer.
