SqlServerConfigurationFactory¶
SqlServerConfigurationFactory is the SQL Server-specific implementation of ConfigurationFactoryBase, supplying the MsSqlConfiguration.MsSql2008 dialect/driver configuration and the SqlServer.config serialized-configuration file name. It is constructed by SqlServerUnitOfWorkFactory to build SQL Server-targeted NHibernate configurations (there is no stateless SQL Server unit-of-work factory in this library).
Purpose¶
- Provides the SQL Server-specific
GetNewConfigurationoverride: configuresFluently.Configure()withMsSqlConfiguration.MsSql2008, and scans this assembly (viaAddFromAssemblyOf<IUnitOfWorkFactory>()) plus any assemblies passed via theClassMapAssemblyListconstructor parameter forClassMap<T>mappings. - Provides the SQL Server-specific
GetConfigurationFileNameoverride, returningSqlServer.configas the serialized-configuration cache file name.
Context¶
- Namespace:
SAIF.Data.NHibernate - Assembly/package:
SAIF.Framework.Data.NHibernate
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| SqlServerConfigurationFactory() | public SqlServerConfigurationFactory() |
Default constructor; scans only this assembly for ClassMap<T> mappings. |
| SqlServerConfigurationFactory(assemblies) | public SqlServerConfigurationFactory(IEnumerable<Assembly> assemblies) |
Constructor accepting additional assemblies to scan for ClassMap<T> mappings beyond this library's own 42 mapping classes. |
Inherited public members¶
Members in this section are inherited from ConfigurationFactoryBase in SAIF.Framework.Data.NHibernate. They are available on this type through inheritance.
| Member | Signature | Purpose | Origin |
|---|---|---|---|
| GetConfiguration | PersistenceConfiguration GetConfiguration(string connection, int batchSize, bool showSql) |
Returns a cached PersistenceConfiguration for connection if one exists; otherwise builds and caches one via CreateConfiguration. |
SAIF.Framework.Data.NHibernate — ConfigurationFactoryBase |
Behavioral notes¶
- Targets
MsSql2008specifically, which affects available SQL syntax NHibernate generates for this engine.*
Constraints and usage notes¶
- Consumers must pass a SQL Server-compatible connection string; no runtime validation of the connection string's target engine is performed by this class.
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/SqlServerConfigurationFactory.csFactories/ConfigurationFactoryBase.cs