Added a poc marker for where a bookmark resides.
Added a marker where a highlight might reside too. Can move forward with a proper implementation.
This commit is contained in:
parent
e5d949161e
commit
32ee60e1de
14 changed files with 257 additions and 76 deletions
|
@ -16,6 +16,7 @@ public interface IUserTableOfContentRepository
|
|||
void Remove(AppUserTableOfContent toc);
|
||||
Task<bool> IsUnique(int userId, int chapterId, int page, string title);
|
||||
IEnumerable<PersonalToCDto> GetPersonalToC(int userId, int chapterId);
|
||||
Task<List<PersonalToCDto>> GetPersonalToCForPage(int userId, int chapterId, int page);
|
||||
Task<AppUserTableOfContent?> Get(int userId, int chapterId, int pageNum, string title);
|
||||
}
|
||||
|
||||
|
@ -55,6 +56,15 @@ public class UserTableOfContentRepository : IUserTableOfContentRepository
|
|||
.AsEnumerable();
|
||||
}
|
||||
|
||||
public async Task<List<PersonalToCDto>> GetPersonalToCForPage(int userId, int chapterId, int page)
|
||||
{
|
||||
return await _context.AppUserTableOfContent
|
||||
.Where(t => t.AppUserId == userId && t.ChapterId == chapterId && t.PageNumber == page)
|
||||
.ProjectTo<PersonalToCDto>(_mapper.ConfigurationProvider)
|
||||
.OrderBy(t => t.PageNumber)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<AppUserTableOfContent?> Get(int userId,int chapterId, int pageNum, string title)
|
||||
{
|
||||
return await _context.AppUserTableOfContent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue