Browse Source

Add Virtual keyword

pull/17110/head
Salih 3 years ago
parent
commit
8c216e01f4
  1. 2
      modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs
  2. 2
      modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs
  3. 2
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs
  4. 2
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/PopularTags/PopularTagsViewComponent.cs

2
modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs

@ -25,7 +25,7 @@ public class TagAppService : CmsKitAppServiceBase, ITagAppService
return ObjectMapper.Map<List<Tag>, List<TagDto>>(entities);
}
public async Task<List<PopularTagDto>> GetPopularTagsAsync(string entityType, int maxCount)
public virtual async Task<List<PopularTagDto>> GetPopularTagsAsync(string entityType, int maxCount)
{
return ObjectMapper.Map<List<PopularTag>, List<PopularTagDto>>(
await TagRepository.GetPopularTagsAsync(

2
modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs

@ -80,7 +80,7 @@ public class EfCoreTagRepository : EfCoreRepository<ICmsKitDbContext, Tag, Guid>
return await query.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken));
}
public async Task<List<PopularTag>> GetPopularTagsAsync(
public virtual async Task<List<PopularTag>> GetPopularTagsAsync(
[NotNull] string entityType,
int maxCount,
CancellationToken cancellationToken = default)

2
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs

@ -83,7 +83,7 @@ public class MongoTagRepository : MongoDbRepository<ICmsKitMongoDbContext, Volo.
}
public async Task<List<PopularTag>> GetPopularTagsAsync(string entityType, int maxCount, CancellationToken cancellationToken = default)
public virtual async Task<List<PopularTag>> GetPopularTagsAsync(string entityType, int maxCount, CancellationToken cancellationToken = default)
{
var tags = await (await GetMongoQueryableAsync(cancellationToken))
.Where(x => x.EntityType == entityType)

2
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/PopularTags/PopularTagsViewComponent.cs

@ -16,7 +16,7 @@ public class PopularTagsViewComponent : AbpViewComponent
_tagAppService = tagAppService;
}
public async Task<IViewComponentResult> InvokeAsync(string entityType, int maxCount, string urlFormat)
public virtual async Task<IViewComponentResult> InvokeAsync(string entityType, int maxCount, string urlFormat)
{
var model = new PopularTagsViewModel
{

Loading…
Cancel
Save