CreateConnection() public static method

public static CreateConnection ( ) : NpgsqlConnection
return Npgsql.NpgsqlConnection
Ejemplo n.º 1
0
 public SqlCommand(string sql)
 {
     _command = new NpgsqlCommand(sql, Database.CreateConnection());
 }
Ejemplo n.º 2
0
 public SqlCommand(string sql, NpgsqlConnection connection = null, NpgsqlTransaction transaction = null)
 {
     _command = new NpgsqlCommand(sql, connection ?? Database.CreateConnection(), transaction);
 }