Class NpgsqlDataSourceManager
- Namespace
- Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal
- Assembly
- Npgsql.EntityFrameworkCore.PostgreSQL.dll
Manages resolving and creating NpgsqlDataSource instances.
public class NpgsqlDataSourceManager : IDisposable, IAsyncDisposable
- Inheritance
-
NpgsqlDataSourceManager
- Implements
- Inherited Members
Remarks
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.
See Implementation of database providers and extensions for more information and examples.
Constructors
NpgsqlDataSourceManager(IEnumerable<INpgsqlDataSourceConfigurationPlugin>)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public NpgsqlDataSourceManager(IEnumerable<INpgsqlDataSourceConfigurationPlugin> plugins)
Parameters
Methods
CreateDataSource(NpgsqlOptionsExtension)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
protected virtual NpgsqlDataSource CreateDataSource(NpgsqlOptionsExtension npgsqlOptionsExtension)
Parameters
npgsqlOptionsExtension
NpgsqlOptionsExtension
Returns
Dispose()
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public void Dispose()
DisposeAsync()
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public ValueTask DisposeAsync()
Returns
GetDataSource(NpgsqlOptionsExtension?, IServiceProvider?)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public virtual DbDataSource? GetDataSource(NpgsqlOptionsExtension? npgsqlOptionsExtension, IServiceProvider? applicationServiceProvider)
Parameters
npgsqlOptionsExtension
NpgsqlOptionsExtensionapplicationServiceProvider
IServiceProvider