source: ChapterX.Infrastructure/Repositories/ReadingListItemsRepository.cs@ acf690c

main
Last change on this file since acf690c was acf690c, checked in by kikisrbinoska <srbinoskakristina07@…>, 4 months ago

Added fixes for the login,stories management and reading lists

  • Property mode set to 100644
File size: 659 bytes
Line 
1using ChapterX.Domain.Entities;
2using ChapterX.Domain.Repositories;
3using ChapterX.Infrastructure.Data.DataContext;
4using Microsoft.EntityFrameworkCore;
5
6namespace ChapterX.Infrastructure.Repositories
7{
8 public class ReadingListItemsRepository : GenericRepository<ReadingListItems>, IReadingListItemsRepository
9 {
10 public ReadingListItemsRepository(ApplicationDbContext context) : base(context)
11 {
12 }
13
14 public async Task<bool> ExistsAsync(int listId, int storyId, CancellationToken cancellationToken = default)
15 => await _dbSet.AnyAsync(i => i.ListId == listId && i.StoryId == storyId, cancellationToken);
16 }
17}
Note: See TracBrowser for help on using the repository browser.