static internal void TryDisposeCurrentHttpContext() { HttpContext context = HttpContext.Current; if (context == null) { throw new ApplicationException("There is no Http Context available"); } lock (context) { WeatherDBContext cur = CurrentHttpContextWeak; if (cur != null) { //cur.Database.Connection.Close(); cur.Dispose(); CurrentHttpContextWeak = null; } } }
public UnitOfWork(WeatherLib.Model.WeatherDBContext context) : base(context) { }