RelationalDatabaseFacadeExtensions.SetConnectionString Method
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.
Sets the underlying connection string configured for this DbContext.
public static void SetConnectionString (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, string connectionString);
public static void SetConnectionString (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, string? connectionString);
static member SetConnectionString : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * string -> unit
<Extension()>
Public Sub SetConnectionString (databaseFacade As DatabaseFacade, connectionString As String)
- databaseFacade
- DatabaseFacade
The DatabaseFacade for the context.
- connectionString
- String
The connection string.
It may not be possible to change the connection string if existing connection, if any, is open.
See Connections and connection strings for more information and examples.
Proizvod | Verzije |
---|---|
Entity Framework Core | 5.0, 6.0, 7.0, 8.0, 9.0 |
Povratne informacije o proizvodu Entity Framework
Entity Framework je projekt otvorenog koda. Odaberite vezu za slanje povratnih informacija: