EntityCommand 建構函式 (String, EntityConnection, IDbDependencyResolver)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
使用給定的 eSQL 陳述式和要使用的連接物件,建構 EntityCommand 物件
命名空間: System.Data.Entity.Core.EntityClient
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Sub New ( _
statement As String, _
connection As EntityConnection, _
resolver As IDbDependencyResolver _
)
'用途
Dim statement As String
Dim connection As EntityConnection
Dim resolver As IDbDependencyResolver
Dim instance As New EntityCommand(statement, _
connection, resolver)
public EntityCommand(
string statement,
EntityConnection connection,
IDbDependencyResolver resolver
)
public:
EntityCommand(
String^ statement,
EntityConnection^ connection,
IDbDependencyResolver^ resolver
)
new :
statement:string *
connection:EntityConnection *
resolver:IDbDependencyResolver -> EntityCommand
public function EntityCommand(
statement : String,
connection : EntityConnection,
resolver : IDbDependencyResolver
)
參數
- statement
類型:System.String
要執行的 eSQL 命令文字
- connection
類型:System.Data.Entity.Core.EntityClient.EntityConnection
連接物件
- resolver
類型:System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver
用來解析 DbProviderServices 的解析程式