DbProviderServices.GetExecutionStrategy 方法 (DbConnection)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
取得 IDbExecutionStrategy,用於執行使用指定連接的方法。
命名空間: System.Data.Entity.Core.Common
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Shared Function GetExecutionStrategy ( _
connection As DbConnection _
) As IDbExecutionStrategy
'用途
Dim connection As DbConnection
Dim returnValue As IDbExecutionStrategy
returnValue = DbProviderServices.GetExecutionStrategy(connection)
public static IDbExecutionStrategy GetExecutionStrategy(
DbConnection connection
)
public:
static IDbExecutionStrategy^ GetExecutionStrategy(
DbConnection^ connection
)
static member GetExecutionStrategy :
connection:DbConnection -> IDbExecutionStrategy
public static function GetExecutionStrategy(
connection : DbConnection
) : IDbExecutionStrategy
參數
- connection
類型:System.Data.Common.DbConnection
資料庫連接
傳回值
類型:System.Data.Entity.Infrastructure.IDbExecutionStrategy
DbExecutionStrategy 的新執行個體