---
title: PersistenceConfiguration
summary: API reference for PersistenceConfiguration.
status: draft
owner: Framework
last_reviewed: 2026-09-15
library: SAIF.Framework.Data.NHibernate
reference_type: package
---

# PersistenceConfiguration

`PersistenceConfiguration` is a small immutable-style data holder returned by `IConfigurationFactory.GetConfiguration`. It pairs a built NHibernate `Configuration` object with the file path of its serialized-configuration cache file, so `ConfigurationFactoryBase` can both use the configuration immediately and persist it for faster subsequent process starts.

## Purpose
- Carries the built NHibernate `Configuration` together with the on-disk path where it was (or will be) serialized, so callers of `IConfigurationFactory.GetConfiguration` receive both pieces of information in one return value.

## Context
- Namespace: `SAIF.Data.NHibernate`
- Assembly/package: `SAIF.Framework.Data.NHibernate`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Configuration | `public Configuration Configuration { get; set; }` | The built NHibernate `Configuration` object, ready for `BuildSessionFactory()`. |
| ConfigurationFilePath | `public string ConfigurationFilePath { get; set; }` | The absolute path to the serialized-configuration cache file (`Oracle.config` or `SqlServer.config`) associated with this configuration. |

## Behavioral notes
- This type has no behavior beyond property storage; it is used purely to pass a (`Configuration`, file path) pair between `ConfigurationFactoryBase` and its callers.*

## Constraints and usage notes
- Both properties are mutable (`get; set;`); callers should treat instances as effectively read-only after being returned from `GetConfiguration`.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `Factories/PersistenceConfiguration.cs`
