Interface ICommentRepository
Inherited Members
Namespace: Volo.CmsKit.Comments
Assembly: Volo.CmsKit.Domain.dll
Syntax
public interface ICommentRepository : IBasicRepository<Comment, Guid>, IBasicRepository<Comment>, IReadOnlyBasicRepository<Comment, Guid>, IReadOnlyBasicRepository<Comment>, IRepository
Methods
DeleteByEntityTypeAndIdAsync(string, string, CancellationToken)
Declaration
Task DeleteByEntityTypeAndIdAsync(string entityType, string entityId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | entityType | |
| string | entityId | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
DeleteWithRepliesAsync(Comment, CancellationToken)
Declaration
Task DeleteWithRepliesAsync(Comment comment, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Comment | comment | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
ExistsAsync(string, CancellationToken)
Declaration
Task<bool> ExistsAsync(string idempotencyToken, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | idempotencyToken | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<bool> |
GetCountAsync(string, string, Guid?, string, DateTime?, DateTime?, CommentApproveState, CancellationToken)
Declaration
Task<long> GetCountAsync(string text = null, string entityType = null, Guid? repliedCommentId = null, string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, CommentApproveState commentApproveState = CommentApproveState.All, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| string | entityType | |
| Guid? | repliedCommentId | |
| string | authorUsername | |
| DateTime? | creationStartDate | |
| DateTime? | creationEndDate | |
| CommentApproveState | commentApproveState | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<long> |
GetListAsync(string, string, Guid?, string, DateTime?, DateTime?, string, int, int, CommentApproveState, CancellationToken)
Declaration
Task<List<CommentWithAuthorQueryResultItem>> GetListAsync(string filter = null, string entityType = null, Guid? repliedCommentId = null, string authorUsername = null, DateTime? creationStartDate = null, DateTime? creationEndDate = null, string sorting = null, int maxResultCount = 2147483647, int skipCount = 0, CommentApproveState commentApproveState = CommentApproveState.All, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filter | |
| string | entityType | |
| Guid? | repliedCommentId | |
| string | authorUsername | |
| DateTime? | creationStartDate | |
| DateTime? | creationEndDate | |
| string | sorting | |
| int | maxResultCount | |
| int | skipCount | |
| CommentApproveState | commentApproveState | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<List<CommentWithAuthorQueryResultItem>> |
GetListWithAuthorsAsync(string, string, CommentApproveState, CancellationToken)
Declaration
Task<List<CommentWithAuthorQueryResultItem>> GetListWithAuthorsAsync(string entityType, string entityId, CommentApproveState commentApproveState = CommentApproveState.All, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | entityType | |
| string | entityId | |
| CommentApproveState | commentApproveState | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<List<CommentWithAuthorQueryResultItem>> |
GetWithAuthorAsync(Guid, CancellationToken)
Declaration
Task<CommentWithAuthorQueryResultItem> GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<CommentWithAuthorQueryResultItem> |