Need to work out the rules with the community but basic metadata is done, just need the people.
This commit is contained in:
parent
585df0b5d3
commit
3557dba465
4 changed files with 79 additions and 7 deletions
|
|
@ -47,6 +47,7 @@ public interface IChapterRepository
|
|||
Task<IEnumerable<string>> GetCoverImagesForLockedChaptersAsync();
|
||||
Task<ChapterDto> AddChapterModifiers(int userId, ChapterDto chapter);
|
||||
IEnumerable<Chapter> GetChaptersForSeries(int seriesId);
|
||||
Task<IList<Chapter>> GetAllChaptersForSeries(int seriesId);
|
||||
}
|
||||
public class ChapterRepository : IChapterRepository
|
||||
{
|
||||
|
|
@ -298,4 +299,13 @@ public class ChapterRepository : IChapterRepository
|
|||
.Include(c => c.Volume)
|
||||
.AsEnumerable();
|
||||
}
|
||||
|
||||
public async Task<IList<Chapter>> GetAllChaptersForSeries(int seriesId)
|
||||
{
|
||||
return await _context.Chapter
|
||||
.Where(c => c.Volume.SeriesId == seriesId)
|
||||
.OrderBy(c => c.SortOrder)
|
||||
.Include(c => c.Volume)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue