public void Dispose() { if (dbContext == null) return; if (dbContext.IsValueCreated) { dbContext.Value.Dispose(); } dbContext = null; }