Skip to content

AddJaseDatabase Method ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

IServiceCollection AddJaseDatabase(IServiceCollection services, Action<DbSessionFactoryOptionsBuilder> configure) ​

csharp
IServiceCollection AddJaseDatabase(IServiceCollection services, Action<DbSessionFactoryOptionsBuilder> configure)

Registers JASE.Database session factory services using the provided builder configuration.

Parameters ​

NameDescription
configureA delegate used to configure database session registrations and factory options.
servicesThe service collection to which JASE.Database services will be added.

Returns ​

The same IServiceCollection instance so that additional service registrations may be chained.

Remarks ​

This method builds a DbSessionFactoryOptions instance from the supplied DbSessionFactoryOptionsBuilder, validates the resulting configuration, and registers IDbSessionFactory as a singleton service.