Compartilhar via


SqlClientFactory.CreateCommand Método

Definição

Retorna uma instância DbCommand fortemente tipada.

public:
 override System::Data::Common::DbCommand ^ CreateCommand();
public override System.Data.Common.DbCommand CreateCommand ();
override this.CreateCommand : unit -> System.Data.Common.DbCommand
Public Overrides Function CreateCommand () As DbCommand

Retornos

Uma nova instância fortemente tipada de DbCommand.

Exemplos

O fragmento de código a seguir retorna uma instância fortemente tipada DbCommand :

Dim newFactory As SqlClientFactory = SqlClientFactory.Instance
Dim cmd As DbCommand = newFactory.CreateCommand()
SqlClientFactory newFactory = SqlClientFactory.Instance;
DbCommand cmd = newFactory.CreateCommand();

Aplica-se a

Confira também