DbConnection.CreateDbCommand 方法

定义

在派生类中重写时,创建并返回与当前连接关联的 DbCommand 对象。When overridden in a derived class, creates and returns a DbCommand object associated with the current connection.

protected:
 abstract System::Data::Common::DbCommand ^ CreateDbCommand();
protected abstract System.Data.Common.DbCommand CreateDbCommand ();
abstract member CreateDbCommand : unit -> System.Data.Common.DbCommand
Protected MustOverride Function CreateDbCommand () As DbCommand

返回

DbCommand

DbCommand 对象。A DbCommand object.

注解

如果要实现自己的连接,请重写此方法以实现创建和返回对象所需的代码 DbCommandIf you are implementing your own connection, override this method to implement the code necessary to create and return a DbCommand object.

适用于