This commit is contained in:
Joe Milazzo 2024-11-20 07:17:36 -06:00 committed by GitHub
parent cb810a2d8f
commit 3e3b6ba92b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 1631 additions and 212 deletions

View file

@ -31,6 +31,7 @@ public interface IChapterRepository
{
void Update(Chapter chapter);
void Remove(Chapter chapter);
void Remove(IList<Chapter> chapters);
Task<IEnumerable<Chapter>> GetChaptersByIdsAsync(IList<int> chapterIds, ChapterIncludes includes = ChapterIncludes.None);
Task<IChapterInfoDto?> GetChapterInfoDtoAsync(int chapterId);
Task<int> GetChapterTotalPagesAsync(int chapterId);
@ -68,6 +69,11 @@ public class ChapterRepository : IChapterRepository
_context.Chapter.Remove(chapter);
}
public void Remove(IList<Chapter> chapters)
{
_context.Chapter.RemoveRange(chapters);
}
public async Task<IEnumerable<Chapter>> GetChaptersByIdsAsync(IList<int> chapterIds, ChapterIncludes includes = ChapterIncludes.None)
{
return await _context.Chapter