---
title: SAIF.NetCore.NHibernate dependencies
summary: Internal and external dependencies for this library.
status: draft
owner: Framework
last_reviewed: 2026-10-02
library: SAIF.NetCore.NHibernate
reference_type: package
---

# SAIF.NetCore.NHibernate dependencies

SAIF.NetCore.NHibernate depends on SAIF.NetCore.ServiceContracts for the `IEnvironmentClient`/`IDBConnectionClient` contracts a consuming application's options class uses, and on FluentNHibernate plus the three engine-specific ADO.NET providers (Oracle, SQL Server, PostgreSQL) for its data-access stack; it makes no outbound API calls of its own.

## Internal dependencies

| Dependency | Reference Type | Usage |
| --- | --- | --- |
| [SAIF.NetCore.ServiceContracts](../saif-netcore-servicecontracts/overview.md) | NuGet Package (same-repo) | `IEnvironmentClient` and `IDBConnectionClient` are constructor-injected into a consumer-authored `ConfigureUnitOfWorkOptions` subclass; this library resolves the types but calls no members itself |

## External dependencies

| Dependency | Version | Usage |
| --- | --- | --- |
| FluentNHibernate | 3.0.1 | Fluent configuration (`Fluently.Configure()`), mapping-assembly discovery (`FluentMappings`/`HbmMappings.AddFromAssembly`), and driver configurers (`OracleDataClientConfiguration`, `MsSqlConfiguration`, `PostgreSQLConfiguration`); brings in NHibernate itself transitively, unpinned in this repository* |
| Oracle.ManagedDataAccess.Core | 3.21.90 | ADO.NET provider behind `OracleManagedDataClientDriver`, used for the Oracle engine configuration (the default and fallback database type) |
| Npgsql | 4.1.5 | ADO.NET provider behind `PostgreSQLConfiguration.Standard` for the PostgreSQL engine configuration |
| System.Data.SqlClient | 4.8.5 | ADO.NET provider behind NHibernate's SQL Server driver for `MsSqlConfiguration.MsSql2008`*; deprecated in favor of `Microsoft.Data.SqlClient` |
| Microsoft.Extensions.DependencyInjection.Abstractions | 6.0.0 | Provides `IServiceCollection`, the extension point used throughout `Extensions/IServicesCollectionExtensions.cs` and `Extensions/IServicesNhibernateExtensions.cs` for DI registration. |
| Microsoft.Extensions.Options | 6.0.0 | Provides `IConfigureNamedOptions<T>` and `IOptionsSnapshot<T>`, used by `ConfigureUnitOfWorkOptions` and by `UnitOfWorkAccessor`'s named-options resolution. |

## Dependency risks and notes
- FluentNHibernate 3.0.1, Npgsql 4.1.5, and `System.Data.SqlClient` 4.8.5 are all outdated or deprecated packages; `Oracle.ManagedDataAccess.Core` 3.21.90 should be checked against current supported releases.
- The resolved NHibernate version is not pinned anywhere in this repository — it arrives transitively through FluentNHibernate 3.0.1, whose published NuGet dependency manifest declares only an open-ended minimum-version floor (`NHibernate [5.2.7, )`), not an exact pin; the exact version actually restored cannot be determined without a package restore or lock file**.
- `System.Data.SqlClient` is a genuine, directly relevant ADO.NET provider dependency for the SQL Server engine and is documented here for completeness.
- `UnitOfWorkOptions` defaults `ShowSql`/`DriverFormatSql` to `true` and `Database` to `Oracle`; an unrecognized `DatabaseType` value silently falls back to Oracle for both the driver configuration and the session helper rather than failing fast.
- The static `SessionFactories` cache is keyed only by connection string, so two configurations sharing a connection string but using different mapping assemblies could collide — unconfirmed in practice**.
- No library or application in this repository references `SAIF.NetCore.NHibernate`; `SAIF.NetCore.ServiceExtensions` does not bring it in transitively even though the top-level architecture diagram in `Architecture.md` draws a composition arrow from ServiceExtensions to the data group — this is a documented discrepancy between the diagram and the actual package graph*.
- This library makes no API (HTTP/SOAP) calls of its own; connection-string retrieval through the DBConnection API is performed by `SAIF.NetCore.DBConnectionClient`, invoked by the consuming application's own `ConfigureUnitOfWorkOptions` subclass, not by this library.

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Configuration](configuration.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Database tables](database-tables.md)
- [SQL catalog](sql/index.md)
- [Service registration](service-registration.md)
- [API reference](api/index.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate.csproj`
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/Factories/Configuration/OracleConfiguration.cs`
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/Factories/Configuration/SqlConfiguration.cs`
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/Factories/Configuration/PostGreSQLConfiguration.cs`
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/Options/ConfigureUnitOfWorkOptions.cs`
- `Architecture.md`
