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 :

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

Aplica-se a