Tag Archives: tutorial

[ASP.NET 5] Lazy DBContext initialization with Entity Framework 7

Advertisement from Google I will show you how to do lazy db context initialization with Entity Framework 7. The idea is simple, we need an easy way to get database context in a request. If db context was used in the request we should call SaveChanges method and dispose used context if not we shouldn’t do anything.… Read More »