protected override void Dispose(bool disposing) { if (disposing) { DbContextProvider.Instance.DisposeContext(); db = null; } base.Dispose(disposing); }
public void DisposeContext() { dbContext.Dispose(); dbContext = null; }
private DbContextProvider() { dbContext = new DataAcess.DbContext(); }