Class PostgreSqlServiceCollectionExtensions
Inheritance
System.Object
PostgreSqlServiceCollectionExtensions
Namespace: Steeltoe.Connectors.PostgreSql
Assembly: Steeltoe.Connectors.dll
Syntax
public static class PostgreSqlServiceCollectionExtensions : object
Methods
| Edit this page View SourceAddPostgreSql(IServiceCollection, IConfiguration)
Registers a ConnectorFactory<TOptions, TConnection> (with type parameters PostgreSqlOptions and Npgsql.NpgsqlConnection) to connect to a PostgreSQL database.
Declaration
public static IServiceCollection AddPostgreSql(this IServiceCollection services, IConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The |
IConfiguration | configuration | The |
Returns
Type | Description |
---|---|
IServiceCollection | The incoming |
AddPostgreSql(IServiceCollection, IConfiguration, Nullable<Action<ConnectorAddOptionsBuilder>>)
Registers a ConnectorFactory<TOptions, TConnection> (with type parameters PostgreSqlOptions and Npgsql.NpgsqlConnection) to connect to a PostgreSQL database.
Declaration
public static IServiceCollection AddPostgreSql(this IServiceCollection services, IConfiguration configuration, Action<ConnectorAddOptionsBuilder>? addAction)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The |
IConfiguration | configuration | The |
System.Nullable<Action<ConnectorAddOptionsBuilder>> | addAction | An optional delegate to configure this connector. |
Returns
Type | Description |
---|---|
IServiceCollection | The incoming |