protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { if (!_keepDatabase) { Delete(); } _context.Dispose(); } disposedValue = true; } }