Table of Contents

Class NpgsqlFactory

Namespace
Npgsql
Assembly
Npgsql.dll

A factory to create instances of various Npgsql objects.

public sealed class NpgsqlFactory : DbProviderFactory, IServiceProvider
Inheritance
NpgsqlFactory
Implements
Inherited Members

Fields

Instance

Gets an instance of the NpgsqlFactory. This can be used to retrieve strongly typed data objects.

public static readonly NpgsqlFactory Instance

Field Value

NpgsqlFactory

Methods

CreateCommand()

Returns a strongly typed DbCommand instance.

public override DbCommand CreateCommand()

Returns

DbCommand

CreateCommandBuilder()

Returns a strongly typed DbCommandBuilder instance.

public override DbCommandBuilder CreateCommandBuilder()

Returns

DbCommandBuilder

CreateConnection()

Returns a strongly typed DbConnection instance.

public override DbConnection CreateConnection()

Returns

DbConnection

CreateConnectionStringBuilder()

Returns a strongly typed DbConnectionStringBuilder instance.

public override DbConnectionStringBuilder CreateConnectionStringBuilder()

Returns

DbConnectionStringBuilder

CreateDataAdapter()

Returns a strongly typed DbDataAdapter instance.

public override DbDataAdapter CreateDataAdapter()

Returns

DbDataAdapter

CreateParameter()

Returns a strongly typed DbParameter instance.

public override DbParameter CreateParameter()

Returns

DbParameter

GetService(Type)

Gets the service object of the specified type.

public object GetService(Type serviceType)

Parameters

serviceType Type

An object that specifies the type of service object to get.

Returns

object

A service object of type serviceType, or null if there is no service object of type serviceType.