From 3fa985e923cf9302cb63584db717356317dbf3bf Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 4 Oct 2022 15:51:36 +0800 Subject: [PATCH] Fix build errors. https://github.com/abpframework/abp/pull/14055 --- .../Caching/EntityCacheWithObjectMapper.cs | 14 +++++++------- .../EntityCacheWithObjectMapperContext.cs | 14 +++++++------- .../Caching/EntityCacheWithoutCacheItem.cs | 17 +++++++++-------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithObjectMapper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithObjectMapper.cs index 0a916c9594..727df63ea7 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithObjectMapper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithObjectMapper.cs @@ -2,23 +2,23 @@ using Volo.Abp.Caching; using Volo.Abp.Domain.Repositories; using Volo.Abp.ObjectMapping; +using Volo.Abp.Uow; namespace Volo.Abp.Domain.Entities.Caching; public class EntityCacheWithObjectMapper : - EntityCacheBase + EntityCacheBase where TEntity : Entity where TEntityCacheItem : class { protected IObjectMapper ObjectMapper { get; } public EntityCacheWithObjectMapper( - IReadOnlyRepository repository, + IReadOnlyRepository repository, IDistributedCache cache, + IUnitOfWorkManager unitOfWorkManager, IObjectMapper objectMapper) - : base( - repository, - cache) + : base(repository, cache, unitOfWorkManager) { ObjectMapper = objectMapper; } @@ -29,7 +29,7 @@ public class EntityCacheWithObjectMapper : { return null; } - + if (typeof(TEntity) == typeof(TEntityCacheItem)) { return entity.As(); @@ -37,4 +37,4 @@ public class EntityCacheWithObjectMapper : return ObjectMapper.Map(entity); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithObjectMapperContext.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithObjectMapperContext.cs index e5eba5781c..f468598652 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithObjectMapperContext.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithObjectMapperContext.cs @@ -1,22 +1,22 @@ using Volo.Abp.Caching; using Volo.Abp.Domain.Repositories; using Volo.Abp.ObjectMapping; +using Volo.Abp.Uow; namespace Volo.Abp.Domain.Entities.Caching; public class EntityCacheWithObjectMapperContext : - EntityCacheWithObjectMapper + EntityCacheWithObjectMapper where TEntity : Entity where TEntityCacheItem : class { public EntityCacheWithObjectMapperContext( IReadOnlyRepository repository, IDistributedCache cache, - IObjectMapper objectMapper) // Intentionally injected with TContext - : base( - repository, - cache, - objectMapper) + IUnitOfWorkManager unitOfWorkManager, + IObjectMapper objectMapper)// Intentionally injected with TContext + : base(repository, cache, unitOfWorkManager, objectMapper) { + } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithoutCacheItem.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithoutCacheItem.cs index 33af591556..c81f3e5e9e 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithoutCacheItem.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheWithoutCacheItem.cs @@ -1,24 +1,25 @@ using Volo.Abp.Caching; using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; namespace Volo.Abp.Domain.Entities.Caching; public class EntityCacheWithoutCacheItem : - EntityCacheBase + EntityCacheBase where TEntity : Entity { public EntityCacheWithoutCacheItem( - IReadOnlyRepository repository, - IDistributedCache cache) - : base( - repository, - cache) + IReadOnlyRepository repository, + IDistributedCache cache, + IUnitOfWorkManager unitOfWorkManager) + : base(repository, cache, unitOfWorkManager) { - } protected override TEntity MapToCacheItem(TEntity entity) { return entity; } -} \ No newline at end of file + + +}