共用方式為


DistributedApplicationFactory.GetConnectionString(String) Method

Definition

Gets the connection string for the specified resource.

public System.Threading.Tasks.ValueTask<string?> GetConnectionString (string resourceName);
member this.GetConnectionString : string -> System.Threading.Tasks.ValueTask<string>
Public Function GetConnectionString (resourceName As String) As ValueTask(Of String)

Parameters

resourceName
String

The resource name.

Returns

The connection string for the specified resource.

Exceptions

The resource was not found or does not expose a connection string.

Applies to