ICommentRepository
Namespace: SlottyMedia.Database.Repository.CommentRepo
Interface for the Comment Repository.
public interface ICommentRepository : SlottyMedia.Database.Repository.IDatabaseRepository`1[[SlottyMedia.Database.Daos.CommentDao, SlottyMedia.Database, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
Implements IDatabaseRepository<CommentDao>
Methods
CountCommentsInPost(Guid)
Counts the total number of comments in the given post.
Task<int> CountCommentsInPost(Guid postId)
Parameters
postId Guid
The post to query
Returns
Task<Int32>
The total number of comments
GetCommentsInPost(Guid, PageRequest)
Fetches all comments in the given post. Utilizes pagination in order to limit the total number of queried posts: Only posts on the given page will be fetched.
Task<IPage<CommentDao>> GetCommentsInPost(Guid postId, PageRequest pageRequest)
Parameters
postId Guid
The post whose comments should be fetched
pageRequest PageRequest
The page request
Returns
Task<IPage<CommentDao>>
A list containing the queried posts