public EfReadOnlyRepository(CleanArchReadOnlyDbContext dbContext) { DbContext = dbContext; Entities = DbContext.Set <TEntity>(); }
public GetProductByIdQueryHandler(CleanArchReadOnlyDbContext dbContext) { this.dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); }
private const int CacheExpiryTime = 2; //minitues public ReadProductFromRedisQueryHandler(CleanArchReadOnlyDbContext dbContext, IStaticCacheManager staticCacheManager) { this.dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); this.staticCacheManager = staticCacheManager ?? throw new ArgumentNullException(nameof(staticCacheManager)); }