Read a mapping from an embedded resource, using a convention.
Namespace:
NHibernate.CfgAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function AddClass ( _ persistentClass As Type _ ) As Configuration |
C# |
---|
public Configuration AddClass( Type persistentClass ) |
Visual C++ |
---|
public: Configuration^ AddClass( Type^ persistentClass ) |
JavaScript |
---|
function addClass(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.