Class NpgsqlFactory
A factory to create instances of various Npgsql objects.
Implements
IServiceProvider
Namespace: Npgsql
Assembly: Npgsql.dll
Syntax
public sealed class NpgsqlFactory : DbProviderFactory, IServiceProvider
Fields
| Improve this Doc View SourceInstance
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 |
Properties
| Improve this Doc View SourceCanCreateCommandBuilder
Specifies whether the specific
Declaration
public override bool CanCreateCommandBuilder { get; }
Property Value
Type | Description |
---|---|
bool |
CanCreateDataAdapter
Specifies whether the specific
Declaration
public override bool CanCreateDataAdapter { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Improve this Doc View SourceCreateCommand()
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 |
---|---|
object? | A service object of type serviceType, or null if there is no service object of type serviceType. |
Implements
IServiceProvider