To add IntelliSense capabilities to Visual Studio for the NHibernate mapping files, we add the
.xsd files, which are part of the NHibernate download, to the solution. For this, create a solution folder named Schema and add the two XML schema definition files
nhibernate-mapping.xsd to this folder, as shown in the following screenshot:
When defining mapping for an entity, we add a new XML file to the project. The file has to have the extension
.hbm.xml. As the name of the file, it is recommended to use the name of the entity you want to map, for example,
Product.hbm.xml when mapping the
Product entity. As ...