RelationalConnection.SetDbConnection(DbConnection, Boolean) 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.
Sets the underlying DbConnection used to connect to the database.
public virtual void SetDbConnection (System.Data.Common.DbConnection? value, bool contextOwnsConnection);
abstract member SetDbConnection : System.Data.Common.DbConnection * bool -> unit
override this.SetDbConnection : System.Data.Common.DbConnection * bool -> unit
Public Overridable Sub SetDbConnection (value As DbConnection, contextOwnsConnection As Boolean)
Parameters
- value
- DbConnection
The connection object.
- contextOwnsConnection
- Boolean
If true
, then EF will take ownership of the connection and will
dispose it in the same way it would dispose a connection created by EF. If false
, then the caller still
owns the connection and is responsible for its disposal.
Implements
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.
Entity Framework