Npgsql.NpgsqlCommand.Connection Property
Connection to the PostgreSQL backend

Syntax

[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.Category("Behavior")]
public NpgsqlConnection Connection { set; get; }

Value

a Npgsql.NpgsqlConnection object

Remarks

The Connection property is a reference to the Npgsql.NpgsqlConnection the commands will be executed against. The connection must be open before the command can be executed. If a command is executed against a closed connection, a InvalidOperationException is thrown.

Requirements

Namespace: Npgsql
Assembly: Npgsql (in Npgsql.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0