Allows the application to specify properties and mapping documents to be used when creating a ISessionFactory.

The following tables list the members exposed by the Configuration type.

Public Methods

  NameDescription
AddAssemblyOverloaded.
AddAuxiliaryDatabaseObject
AddClass
Read a mapping from an embedded resource, using a convention.

AddDirectory
Read all mapping documents from a directory tree. Assume that any file named *.hbm.xml is a mapping document.

AddDocumentOverloaded.
AddFileOverloaded.
AddFilterDefinition
AddInputStreamOverloaded.
AddProperties
Adds an IDictionary of configuration properties. The Key is the name of the Property and the Value is the String value of the Property.

AddResource
Adds the mappings in the resource of the assembly.

AddResources
AddSqlFunction
AddUrlOverloaded.
AddXmlOverloaded.
AddXmlFile
Read mappings from a particular XML file.

AddXmlReaderOverloaded.
AddXmlString
Read mappings from a String.

BuildSessionFactory
Instantiate a new ISessionFactory, using the properties and mappings in this configuration. The ISessionFactory will be immutable, so changes made to the configuration after building the ISessionFactory will not affect it.

ConfigureOverloaded.
CreateMappings
Create a new Mappings to add classes and collection mappings to.

GenerateDropSchemaScript
Generate DDL for droping tables

GenerateSchemaCreationScript
Generate DDL for creating tables

GetClassMapping
Get the mapping for a particular class

GetCollectionMapping
Get the mapping for a particular collection role

GetProperty
Gets the value of the configuration property.

LoadMappingDocument
Load and validate the mappings in the XmlTextReader against the nhibernate-mapping-2.2 schema, without adding them to the configuration.

SetCacheConcurrencyStrategyOverloaded.
SetDefaultAssembly
Set the default assembly to use for the mappings added to the configuration afterwards.

SetDefaultNamespace
Set the default namespace to use for the mappings added to the configuration afterwards.

SetInterceptor
Sets the default interceptor for use by all sessions.

SetNamingStrategy
Set a custom naming strategy

SetProperties
Specify a completely new set of properties

SetProperty
Sets the value of the configuration property.

Protected Methods

Public Fields

  NameDescription
static memberCfgSchemaXMLNS
The XML Namespace for the nhibernate-configuration

static memberMappingSchemaXMLNS
The XML Namespace for the nhibernate-mapping

Public Constructors

  NameDescription
ConfigurationNew
Create a new Configuration object.

Public Properties

  NameDescription
ClassMappings
The class mappings

CollectionMappings
The collection mappings

FilterDefinitions
Imports
Get the query language imports

Interceptor
Gets or sets the IInterceptor to use.

NamedQueries
The named queries

NamedSQLQueries
The named SQL queries

NamingStrategy
Naming strategy for tables and columns

Properties
Gets or sets the IDictionary that contains the configuration properties and their values.

SqlFunctions
SqlResultSetMappings