Class NpgsqlFactory
A factory to create instances of various Npgsql objects.
Inheritance
Implements
Inherited Members
Namespace: Npgsql
Assembly: Npgsql.dll
Syntax
[Serializable]
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 System.Data.Common.DbCommand instance.
Declaration
public override DbCommand CreateCommand()
Returns
Type | Description |
---|---|
System.Data.Common.DbCommand |
Overrides
CreateCommandBuilder()
Returns a strongly typed System.Data.Common.DbCommandBuilder instance.
Declaration
public override DbCommandBuilder CreateCommandBuilder()
Returns
Type | Description |
---|---|
System.Data.Common.DbCommandBuilder |
Overrides
CreateConnection()
Returns a strongly typed System.Data.Common.DbConnection instance.
Declaration
public override DbConnection CreateConnection()
Returns
Type | Description |
---|---|
System.Data.Common.DbConnection |
Overrides
CreateConnectionStringBuilder()
Returns a strongly typed System.Data.Common.DbConnectionStringBuilder instance.
Declaration
public override DbConnectionStringBuilder CreateConnectionStringBuilder()
Returns
Type | Description |
---|---|
System.Data.Common.DbConnectionStringBuilder |
Overrides
CreateDataAdapter()
Returns a strongly typed System.Data.Common.DbDataAdapter instance.
Declaration
public override DbDataAdapter CreateDataAdapter()
Returns
Type | Description |
---|---|
System.Data.Common.DbDataAdapter |
Overrides
CreateParameter()
Returns a strongly typed System.Data.Common.DbParameter instance.
Declaration
public override DbParameter CreateParameter()
Returns
Type | Description |
---|---|
System.Data.Common.DbParameter |
Overrides
GetService(Type)
Gets the service object of the specified type.
Declaration
public object GetService(Type serviceType)
Parameters
Type | Name | Description |
---|---|---|
System.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. |