Browse Source

Use getter only properties instead of variables for injected services

pull/7757/head
Ilkay Ilknur 5 years ago
parent
commit
f9285cb649
  1. 3
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs
  2. 2
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs

3
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);
}
}

2
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)
{

Loading…
Cancel
Save