# SqlPersistenceDiagnosticsSnapshot

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.sqlpersistencediagnosticssnapshot/
> Summary: SqlPersistenceDiagnosticsSnapshot: Represents the current connection and migration status of an SQL persistence provider.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

Represents the current connection and migration status of an SQL persistence provider.

```csharp
public sealed record SqlPersistenceDiagnosticsSnapshot : IEquatable<SqlPersistenceDiagnosticsSnapshot>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.sqlpersistencediagnosticssnapshot/">SqlPersistenceDiagnosticsSnapshot</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;SqlPersistenceDiagnosticsSnapshot&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Constructors

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot__ctor"></a> SqlPersistenceDiagnosticsSnapshot\(\)

```csharp
public SqlPersistenceDiagnosticsSnapshot()
```

## Properties

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot_CanConnect"></a> CanConnect

Gets whether the database can be reached.

```csharp
public required bool CanConnect { get; init; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot_PendingMigrations"></a> PendingMigrations

Gets the pending migration names. The list is unknown and empty if the database cannot be reached.

```csharp
public required IReadOnlyList<string> PendingMigrations { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

## Methods

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot_Equals_Tracon_SqlPersistenceDiagnosticsSnapshot_"></a> Equals\(SqlPersistenceDiagnosticsSnapshot?\)

```csharp
public bool Equals(SqlPersistenceDiagnosticsSnapshot? other)
```

#### Parameters

`other` [SqlPersistenceDiagnosticsSnapshot](/api/tracon.sqlpersistencediagnosticssnapshot/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot_op_Equality_Tracon_SqlPersistenceDiagnosticsSnapshot_Tracon_SqlPersistenceDiagnosticsSnapshot_"></a> operator ==\(SqlPersistenceDiagnosticsSnapshot?, SqlPersistenceDiagnosticsSnapshot?\)

```csharp
public static bool operator ==(SqlPersistenceDiagnosticsSnapshot? left, SqlPersistenceDiagnosticsSnapshot? right)
```

#### Parameters

`left` [SqlPersistenceDiagnosticsSnapshot](/api/tracon.sqlpersistencediagnosticssnapshot/)?

`right` [SqlPersistenceDiagnosticsSnapshot](/api/tracon.sqlpersistencediagnosticssnapshot/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_SqlPersistenceDiagnosticsSnapshot_op_Inequality_Tracon_SqlPersistenceDiagnosticsSnapshot_Tracon_SqlPersistenceDiagnosticsSnapshot_"></a> operator \!=\(SqlPersistenceDiagnosticsSnapshot?, SqlPersistenceDiagnosticsSnapshot?\)

```csharp
public static bool operator !=(SqlPersistenceDiagnosticsSnapshot? left, SqlPersistenceDiagnosticsSnapshot? right)
```

#### Parameters

`left` [SqlPersistenceDiagnosticsSnapshot](/api/tracon.sqlpersistencediagnosticssnapshot/)?

`right` [SqlPersistenceDiagnosticsSnapshot](/api/tracon.sqlpersistencediagnosticssnapshot/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
