protected virtual void Dispose(bool disposing) { lock (syncObj) { if (!isDisposed && disposing) { if (context != null) { context.Dispose(); } isDisposed = true; } } }