diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs index 60c83a2551..e045f1137a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs @@ -15,7 +15,7 @@ namespace Volo.CmsKit.Admin.Comments [Authorize(CmsKitAdminPermissions.Comments.Default)] public class CommentAdminAppService : CmsKitAdminAppServiceBase, ICommentAdminAppService { - protected readonly ICommentRepository CommentRepository; + protected ICommentRepository CommentRepository { get; } public CommentAdminAppService(ICommentRepository commentRepository) { @@ -65,7 +65,6 @@ namespace Volo.CmsKit.Admin.Comments public virtual async Task DeleteAsync(Guid id) { var comment = await CommentRepository.GetAsync(id); - await CommentRepository.DeleteWithRepliesAsync(comment); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs index 8d25f93b32..9f71761235 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs @@ -17,7 +17,7 @@ namespace Volo.CmsKit.Admin.Comments [Route("api/cms-kit-admin/comments")] public class CommentAdminController : CmsKitAdminController, ICommentAdminAppService { - protected readonly ICommentAdminAppService CommentAdminAppService; + protected ICommentAdminAppService CommentAdminAppService { get; } public CommentAdminController(ICommentAdminAppService commentAdminAppService) {