public void Dispose() { if (context != null) { context.Dispose(); context = null; } }
protected virtual void Dispose(bool disposing) { if (disposing) { // Free managed resources if (db != null) { db.Dispose(); db = null; } } }