source: ChapterX.Infrastructure/Repositories/ReadingListRepository.cs@ e294f7d

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

Added files

  • Property mode set to 100644
File size: 694 bytes
RevLine 
[877c13c]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 ReadingListRepository : GenericRepository<ReadingList>, IReadingListRepository
9 {
10 public ReadingListRepository(ApplicationDbContext context) : base(context)
11 {
12 }
13
14 public async Task<IEnumerable<ReadingList>> GetByUserIdAsync(int userId, CancellationToken cancellationToken = default)
15 {
16 return await _dbSet
17 .Where(r => r.UserId == userId)
18 .ToListAsync(cancellationToken);
19 }
20 }
21}
Note: See TracBrowser for help on using the repository browser.