In order for NHibernate to automatically fill data into our classes, we need to have some classes for it to fill! Let's start out by creating our
OrderHeader
class to map the OrderHeader data into.
In a new instance of Visual Studio, select File | New | Project, as shown in the following screenshot:
The New Project dialog will appear. If you are working in C#, select Visual C#, then Windows, and click on Class Library, as shown in the following screenshot:
If you are a VB programmer, select Visual Basic, Windows, Class Library, as shown in the following screenshot:
Enter Ordering.Data in the Name: textbox, and Ordering in the Solution Name: textbox. Make sure you leave the Create directory for solution checked.
This will give us a new DLL project called Ordering.Data inside a folder named Ordering, which contains a solution named
Ordering
. When you're done with it, the folder structure should look similar to the one shown in the following screenshot...