- NHibernate Tutorial
- NHibernate - Home
- NHibernate - Overview
- NHibernate - Architecture
- NHibernate - Orm
- NHibernate - Environment Setup
- NHibernate - Getting Started
- NHibernate - Basic Orm
- NHibernate - Basic Crud Operations
- NHibernate - Profiler
- Add Intelliesnse To Mapping File
- NHibernate - Data Types Mapping
- NHibernate - Configuration
- NHibernate - Override Configuration
- NHibernate - Batch Size
- NHibernate - Caching
- NHibernate - Mapping Component
- NHibernate - Relationships
- NHibernate - Collection Mapping
- NHibernate - Cascades
- NHibernate - Lazy Loading
- NHibernate - Inverse Relationships
- NHibernate - Load/Get
- NHibernate - Linq
- NHibernate - Query Language
- NHibernate - Criteria Queries
- NHibernate - QueryOver Queries
- NHibernate - Native Sql
- NHibernate - Fluent Hibernate
- NHibernate Useful Resources
- NHibernate - Quick Guide
- NHibernate - Useful Resources
- NHibernate - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Add IntelliSense To Mapping File
In this chapter, we will add IntelliSense to our NHibernate mapping files (*.hbm.xml files). As you have observed while mapping the domain Student class that currently we don’t have IntelliSense available. It’s very useful to have the XML schemas available. So in this chapter you will understand how to add IntelliSense in Visual Studio for these NHibernate XML files.
Open the mapping file and you will see that XML menu option appears in the main menu.
Select the XML → Schemas… menu option and it will display the XML Schemas dialog box.
Select the Add… button which is on the top right of the dialog box, which opens the file dialog. Now go to the packages folder, which is in the Solution folder of your project and you will see the different packages included in your project.
Now, double-click on NHibernate.4.*** folder and you will see the two schemas (*.xsd) files or XML schema definition files that define the NHibernate configuration and mapping.
Select these two schema files and click Open button.
You can see that the NHibernate schemas are added into the XML Schemas dialog. Click the OK button. Now, let’s start a new property tag and you will see that we've got full IntelliSense on here.
IntelliSense is now available for you which saves a lot of time during object-relational mapping.