public TodoCacheRepository( ITodoCache todoCache, IDbConnection db, ILogger <TodoRepository> logger = null) : base(db, logger) { this.todoCache = todoCache; // Initialize Cache with all items if (this.todoCache.SourceCache.Count == 0) { this.todoCache.SourceCache.AddOrUpdate(base.GetAll(0, 1000).Items); } }
public TodoController(ITodoRepository repository, ITodoCache cache, ILogger <TodoController> logger) { this.repository = repository; this.cache = cache; _logger = logger; }
public TodoController(ITodoRepository todoRepository, ITodoCache todoCache) { _todoRepository = todoRepository; _cache = todoCache; }