Monthly Archives: May 2016

Autofac, DataContext and MemoryCache issue

Prolog In one of my web application I use MemoryCache to improve performance. The code looks like this: public class CurrencyRepository(DbContext context) { private DbContext context; public CurrencyRepository(DbContext context) { this.context = context; } public List<Currency> GetList() { /* read data from context*/ { } public class CurrencyService(ICurrencyRepository repo) {… Read more »