mirror of https://github.com/abpframework/abp.git
3 changed files with 23 additions and 22 deletions
@ -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<TObjectMapperContext, TEntity, TEntityCacheItem, TKey> : |
|||
EntityCacheWithObjectMapper<TEntity, TEntityCacheItem, TKey> |
|||
EntityCacheWithObjectMapper<TEntity, TEntityCacheItem, TKey> |
|||
where TEntity : Entity<TKey> |
|||
where TEntityCacheItem : class |
|||
{ |
|||
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,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<TEntity, TKey> : |
|||
EntityCacheBase<TEntity, TEntity, TKey> |
|||
EntityCacheBase<TEntity, TEntity, TKey> |
|||
where TEntity : Entity<TKey> |
|||
{ |
|||
public EntityCacheWithoutCacheItem( |
|||
IReadOnlyRepository<TEntity, TKey> repository, |
|||
IDistributedCache<TEntity, TKey> cache) |
|||
: base( |
|||
repository, |
|||
cache) |
|||
IReadOnlyRepository<TEntity, TKey> repository, |
|||
IDistributedCache<TEntity, TKey> cache, |
|||
IUnitOfWorkManager unitOfWorkManager) |
|||
: base(repository, cache, unitOfWorkManager) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected override TEntity MapToCacheItem(TEntity entity) |
|||
{ |
|||
return entity; |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
Loading…
Reference in new issue