Class NpgsqlFactory
A factory to create instances of various Npgsql objects.
Inheritance
System.Object
NpgsqlFactory
Implements
IServiceProvider
Namespace: Npgsql
Assembly: Npgsql.dll
Syntax
public sealed class NpgsqlFactory : DbProviderFactory, IServiceProvider
Fields
Instance
Gets an instance of the NpgsqlFactory. This can be used to retrieve strongly typed data objects.
Declaration
public static readonly NpgsqlFactory Instance
Field Value
Type | Description |
---|---|
NpgsqlFactory |
Methods
CreateCommand()
Returns a strongly typed
Declaration
public override DbCommand CreateCommand()
Returns
Type | Description |
---|---|
DbCommand |
CreateCommandBuilder()
Returns a strongly typed
Declaration
public override DbCommandBuilder CreateCommandBuilder()
Returns
Type | Description |
---|---|
DbCommandBuilder |
CreateConnection()
Returns a strongly typed
Declaration
public override DbConnection CreateConnection()
Returns
Type | Description |
---|---|
DbConnection |
CreateConnectionStringBuilder()
Returns a strongly typed
Declaration
public override DbConnectionStringBuilder CreateConnectionStringBuilder()
Returns
Type | Description |
---|---|
DbConnectionStringBuilder |
CreateDataAdapter()
Returns a strongly typed
Declaration
public override DbDataAdapter CreateDataAdapter()
Returns
Type | Description |
---|---|
DbDataAdapter |
CreateParameter()
Returns a strongly typed
Declaration
public override DbParameter CreateParameter()
Returns
Type | Description |
---|---|
DbParameter |
GetService(Type)
Gets the service object of the specified type.
Declaration
public object GetService(Type serviceType)
Parameters
Type | Name | Description |
---|---|---|
Type | serviceType | An object that specifies the type of service object to get. |
Returns
Type | Description |
---|---|
System.Object | A service object of type serviceType, or null if there is no service object of type serviceType. |
Implements
IServiceProvider