Read a mapping from an embedded resource, using a convention.
Namespace: NHibernate.CfgAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
public Configuration AddClass( Type persistentClass ) |
Visual Basic |
---|
Public Function AddClass ( _ persistentClass As Type _ ) As Configuration |
Visual C++ |
---|
public: Configuration^ AddClass( Type^ persistentClass ) |
Parameters
- persistentClass
- Type: System..::..Type
The type to map.
Return Value
This configuration object.Remarks
The convention is for class Foo.Bar.Foo to be mapped by
the resource named Foo.Bar.Foo.hbm.xml, embedded in
the class' assembly. If the mappings and classes are defined
in different assemblies or don't follow the naming convention,
this method cannot be used.