ConfigurationExtensions.GetConnectionString(IConfiguration, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the specified connection string from the specified configuration.
Shorthand for GetSection("ConnectionStrings")[name]
.
public:
[System::Runtime::CompilerServices::Extension]
static System::String ^ GetConnectionString(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::String ^ name);
public static string? GetConnectionString (this Microsoft.Extensions.Configuration.IConfiguration configuration, string name);
static member GetConnectionString : Microsoft.Extensions.Configuration.IConfiguration * string -> string
<Extension()>
Public Function GetConnectionString (configuration As IConfiguration, name As String) As String
Parameters
- configuration
- IConfiguration
The configuration to enumerate.
- name
- String
The connection string key.
Returns
The connection string.
Applies to
Sodelujte z nami v storitvi GitHub
Vir za to vsebino najdete v storitvi GitHub, kjer lahko tudi ustvarite in pregledate težave in zahtevke za uveljavitev sprememb. Če želite več informacij, glejte naš vodnik za sodelavce.