-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIPostRepository.cs
34 lines (21 loc) · 1.1 KB
/
IPostRepository.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using PEP.Models.Domain;
namespace PEP.Repositories.Interface
{
public interface IPostRepository
{
Task<List<Post>?> GetPostsListByProblemIdAsync(bool isSolution, int problemId, int pageNumber, int? pageSize);
Task<Post?> GetPostByIdAsync(int postId);
Task<Post?> AddPostAsync(Post post);
Task<Post?> UpdatePostAsync(int postId, Post post);
Task<Post?> DeletePostByIdAsync(int postId);
Task<List<Post>?> GetPostsListByUserIdAsync(int userId, int pageNumber, int? pageSize, bool isSolution = true);
Task<Comment?> AddCommentAsync(Comment comment);
Task<Comment?> DeleteCommentByIdAsync(int commentId);
Task<List<Comment>?> GetCommentsByPostIdAsync(int postId, int pageNumber, int? pageSize);
Task<Reply?> AddReplyAsync(Reply reply);
Task<Reply?> DeleteReplyByIdAsync(int replyId);
Task<UserLike?> AddUserLikeAsync(UserLike userLike);
Task<UserLike?> DeleteUserLikeAsync(int userId,int postId);
//Task<List<Reply>?> GetReplysByPostIdAsync(int commentId, int pageNumber, int? pageSize);
}
}