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
Methods
CreateCommand()
Returns a strongly typed DbCommand instance.
public override DbCommand CreateCommand()
Returns
CreateCommandBuilder()
Returns a strongly typed DbCommandBuilder instance.
public override DbCommandBuilder CreateCommandBuilder()
Returns
CreateConnection()
Returns a strongly typed DbConnection instance.
public override DbConnection CreateConnection()
Returns
CreateConnectionStringBuilder()
Returns a strongly typed DbConnectionStringBuilder instance.
public override DbConnectionStringBuilder CreateConnectionStringBuilder()
Returns
CreateDataAdapter()
Returns a strongly typed DbDataAdapter instance.
public override DbDataAdapter CreateDataAdapter()
Returns
CreateParameter()
Returns a strongly typed DbParameter instance.
public override DbParameter CreateParameter()
Returns
GetService(Type)
Gets the service object of the specified type.
public object GetService(Type serviceType)
Parameters
serviceType
TypeAn 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.