DbProviderServices.GetExecutionStrategy 方法 (DbConnection, String)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
取得 IDbExecutionStrategy,用於執行使用指定連接的方法。 此多載應由衍生的類別所使用,以獲得與包裝提供者的相容性。
命名空間: System.Data.Entity.Core.Common
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Protected Shared Function GetExecutionStrategy ( _
connection As DbConnection, _
providerInvariantName As String _
) As IDbExecutionStrategy
'用途
Dim connection As DbConnection
Dim providerInvariantName As String
Dim returnValue As IDbExecutionStrategy
returnValue = DbProviderServices.GetExecutionStrategy(connection, _
providerInvariantName)
protected static IDbExecutionStrategy GetExecutionStrategy(
DbConnection connection,
string providerInvariantName
)
protected:
static IDbExecutionStrategy^ GetExecutionStrategy(
DbConnection^ connection,
String^ providerInvariantName
)
static member GetExecutionStrategy :
connection:DbConnection *
providerInvariantName:string -> IDbExecutionStrategy
protected static function GetExecutionStrategy(
connection : DbConnection,
providerInvariantName : String
) : IDbExecutionStrategy
參數
- connection
類型:System.Data.Common.DbConnection
資料庫連接
- providerInvariantName
類型:System.String
提供者非變異名稱
傳回值
類型:System.Data.Entity.Infrastructure.IDbExecutionStrategy
DbExecutionStrategy 的新執行個體