DefaultConnectionStrings.TryGetConnectionString method
Gets a connection string by its key, resolving any connection key fallbacks. If the specified key is not configured but has a fallback, the fallback connection string is returned. The returned ConnectionKey is the key the connection is actually registered under.
public virtual IConnectionString? TryGetConnectionString(string connectionKey)
| parameter | description |
|---|---|
| connectionKey | The connection key. |
Return Value
The connection string, or null if not found.
See Also
- interface IConnectionString
- class DefaultConnectionStrings