Ignore:
Timestamp:
06/24/26 16:28:50 (11 days ago)
Author:
kikisrbinoska <srbinoskakristina07@…>
Branches:
main
Children:
a8f4a2d
Parents:
0b502c2
Message:

Fixed writer section and admin management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ChapterX.Infrastructure/Repositories/StoryRepository.cs

    r0b502c2 r99c1e45  
    2525        }
    2626
     27        public override async Task<Story?> GetByIdAsync(int id, CancellationToken cancellationToken = default)
     28        {
     29            return await _dbSet
     30                .Include(s => s.HasGenres)
     31                    .ThenInclude(hg => hg.Genre)
     32                .Include(s => s.Writer)
     33                    .ThenInclude(w => w!.User)
     34                .Include(s => s.Likes)
     35                .Include(s => s.Comments)
     36                .Include(s => s.Chapters)
     37                .FirstOrDefaultAsync(s => s.Id == id, cancellationToken);
     38        }
     39
    2740        public async Task<IEnumerable<Story>> GetByWriterIdAsync(int writerId, CancellationToken cancellationToken = default)
    2841        {
Note: See TracChangeset for help on using the changeset viewer.