maliming 3 years ago
parent 18fb3b2069
commit 3fa985e923

@ -2,6 +2,7 @@
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
namespace Volo.Abp.Domain.Entities.Caching;
@ -15,10 +16,9 @@ public class EntityCacheWithObjectMapper<TEntity, TEntityCacheItem, TKey> :
public EntityCacheWithObjectMapper(
IReadOnlyRepository<TEntity, TKey> repository,
IDistributedCache<TEntityCacheItem, TKey> cache,
IUnitOfWorkManager unitOfWorkManager,
IObjectMapper objectMapper)
: base(
repository,
cache)
: base(repository, cache, unitOfWorkManager)
{
ObjectMapper = objectMapper;
}

@ -1,6 +1,7 @@
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
namespace Volo.Abp.Domain.Entities.Caching;
@ -12,11 +13,10 @@ public class EntityCacheWithObjectMapperContext<TObjectMapperContext, TEntity, T
public EntityCacheWithObjectMapperContext(
IReadOnlyRepository<TEntity, TKey> repository,
IDistributedCache<TEntityCacheItem, TKey> cache,
IObjectMapper<TObjectMapperContext> objectMapper) // Intentionally injected with TContext
: base(
repository,
cache,
objectMapper)
IUnitOfWorkManager unitOfWorkManager,
IObjectMapper objectMapper)// Intentionally injected with TContext
: base(repository, cache, unitOfWorkManager, objectMapper)
{
}
}

@ -1,5 +1,6 @@
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;
namespace Volo.Abp.Domain.Entities.Caching;
@ -9,16 +10,16 @@ public class EntityCacheWithoutCacheItem<TEntity, TKey> :
{
public EntityCacheWithoutCacheItem(
IReadOnlyRepository<TEntity, TKey> repository,
IDistributedCache<TEntity, TKey> cache)
: base(
repository,
cache)
IDistributedCache<TEntity, TKey> cache,
IUnitOfWorkManager unitOfWorkManager)
: base(repository, cache, unitOfWorkManager)
{
}
protected override TEntity MapToCacheItem(TEntity entity)
{
return entity;
}
}
Loading…
Cancel
Save