Browse Source
Merge pull request #14040 from abpframework/EngincanV-patch-1
cms-kit: Fix type on `BlogFeatureAppService.cs`
pull/14047/head
Engincan VESKE
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Blogs/BlogFeatureAppService.cs
|
|
|
@ -26,12 +26,12 @@ public class BlogFeatureAppService : CmsKitAppServiceBase, IBlogFeatureAppServic |
|
|
|
{ |
|
|
|
var cacheItem = await Cache.GetOrAddAsync( |
|
|
|
new BlogFeatureCacheKey(blogId, featureName), |
|
|
|
() => GetOrDefaultFroRepositoryAsync(blogId, featureName)); |
|
|
|
() => GetOrDefaultFromRepositoryAsync(blogId, featureName)); |
|
|
|
|
|
|
|
return ObjectMapper.Map<BlogFeatureCacheItem, BlogFeatureDto>(cacheItem); |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual async Task<BlogFeatureCacheItem> GetOrDefaultFroRepositoryAsync(Guid blogId, string featureName) |
|
|
|
protected virtual async Task<BlogFeatureCacheItem> GetOrDefaultFromRepositoryAsync(Guid blogId, string featureName) |
|
|
|
{ |
|
|
|
var feature = await BlogFeatureRepository.FindAsync(blogId, featureName); |
|
|
|
var blogFeature = feature ?? new BlogFeature(blogId, featureName); |
|
|
|
|