Click here to Skip to main content
15,358,692 members
Articles / Database Development / SQL Server
Article
Posted 22 Jun 2006

Stats

392.4K views
5.7K downloads
126 bookmarked

NHibernate Helper Kit

Rate me:
Please Sign up or sign in to vote.
3.62/5 (38 votes)
19 Aug 2006GPL32 min read
Here is a tool to help you build your NHibernate ORM applications.

Screenshot - figure6.gif

Introduction

Here is a tool for the use of your own applications that NHibernate. You can easily install and use this helper kit. To download, please click the link at the top of the page. If you are using NHibernate, you need to write a lot of persistent classes and XML mapping for each persistent class. Also, you need to write the NHibernate config file. At this point, using this tool, you can automatically create all these files in a few seconds.

Installing

After you download the installation files, unzip the file and open the folder. Then, you will see the following:

  • Setup.exe (shortcut): You can install the add-in via this installer.
  • Files (folder): All the needed files are here.

Open setup.exe and you will see the following interface:

Screenshot - figure1.gif

Click Run, and it will install itself; it will take a few seconds.

Using

After the installation, run Visual Studio 2005 and go to the Tools menu. You will see an add-in that is named Avva Mobile NHibernate Helper Kit BETA. There are four tab screens on the tool.

  1. Connection: This screen allows you to connect your database with connection parameters. It looks like the Visual Studio connection wizard. You need to set some parameters to connect to your database.
  2. Screenshot - figure2.gif

  3. Tables & Columns: This screen allows you to browse a selected database's tables and select them to create files. Also, if you want, you can see a table's column information by selecting from a table from a list and clicking "Preview Columns".
  4. Screenshot - figure3.gif

    Screenshot - figure4.gif

  5. Settings: This screen allows you to select some features, for example, copy the NHibernate DLL and use dynamic updates. Also, you have to select your project folder to configure the folders, namespaces, and assembly names.
  6. Screenshot - figure5.gif

  7. Generate: At the end of this, we can start the generate process. Just click Run and wait a few seconds. You can view all the process details in this section.
  8. Screenshot - figure6.gif

    After you've successfully completed the generating process, you can see the generated files in the project folder. If you selected "Copy NHibernate DLL to project" and other DLLs, the generator will copy it and create an NHibernate config file in your project's "bin" folder.

    Copies files to bin directory

    Also, the generator creates a folder named App_Code in your project folder to put persistent classes and mapping files in. It directly creates persistent classes to App_Code, and mapping files creates them in the NHMappings folder, as follows:

    App_Code folder for persistent classes

    NHMappings folder for mapping XML files

Let's check it out how it's looking.

Persistent class

Persistent class

Mapping the XML file

Mapping XML file

The next version will have...

  • VB.NET and C# language support
  • Table relationships
  • A sample using application blocks
  • Generic class implementation
  • And more according to your ideas, thoughts, and suggestions...

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Murat YILMAZ
Product Manager Doğan Online
Turkey Turkey
No Biography provided

Comments and Discussions

 
GeneralRe: Installation problems Pin
cpiel3511-Jul-06 23:18
Membercpiel3511-Jul-06 23:18 
GeneralRe: Installation problems Pin
Murat YILMAZ12-Jul-06 4:53
MemberMurat YILMAZ12-Jul-06 4:53 
GeneralRe: Installation problems Pin
zhi_xiangfei17-Aug-06 20:02
Memberzhi_xiangfei17-Aug-06 20:02 
GeneralRe: Installation problems Pin
Murat YILMAZ18-Aug-06 1:20
MemberMurat YILMAZ18-Aug-06 1:20 
GeneralRe: Installation problems Pin
Afry471119-Aug-06 1:42
MemberAfry471119-Aug-06 1:42 
GeneralSetup.exe Pin
Egidio27-Jun-06 23:54
MemberEgidio27-Jun-06 23:54 
GeneralRe: Setup.exe [modified] Pin
Murat YILMAZ28-Jun-06 0:02
MemberMurat YILMAZ28-Jun-06 0:02 
QuestionThis looks it does similar to Mygeneration or Codesmith Pin
Jafin25-Jun-06 13:57
MemberJafin25-Jun-06 13:57 
I haven't downloaded the code yet just reading the article. But is this performing similar to the MyGeneration NHibernate templates or the codesmith templates which generate your hbm.xml's and your poco's?


AnswerRe: This looks it does similar to Mygeneration or Codesmith Pin
Murat YILMAZ25-Jun-06 19:44
MemberMurat YILMAZ25-Jun-06 19:44 
GeneralGood Start Pin
StevieGen24-Jun-06 17:50
MemberStevieGen24-Jun-06 17:50 
GeneralRe: Good Start Pin
Murat YILMAZ25-Jun-06 2:29
MemberMurat YILMAZ25-Jun-06 2:29 
Generalcode Pin
farabba23-Jun-06 5:29
Memberfarabba23-Jun-06 5:29 
GeneralMissing source [modified] Pin
WillemM23-Jun-06 4:38
MemberWillemM23-Jun-06 4:38 
GeneralRe: Missing source Pin
UnquaLeX23-Jun-06 5:10
MemberUnquaLeX23-Jun-06 5:10 
GeneralRe: Missing source Pin
Murat YILMAZ23-Jun-06 5:15
MemberMurat YILMAZ23-Jun-06 5:15 
GeneralRe: Missing source Pin
Murat YILMAZ23-Jun-06 5:11
MemberMurat YILMAZ23-Jun-06 5:11 
GeneralRe: Missing source Pin
eliasis26-Jun-06 4:19
Membereliasis26-Jun-06 4:19 
QuestionSource Code? Pin
Steve Hansen23-Jun-06 3:35
MemberSteve Hansen23-Jun-06 3:35 
AnswerRe: Source Code? Pin
Murat YILMAZ23-Jun-06 3:42
MemberMurat YILMAZ23-Jun-06 3:42 
GeneralRe: Source Code? [modified] Pin
Jonathan [Darka]23-Jun-06 4:07
professionalJonathan [Darka]23-Jun-06 4:07 
GeneralRe: Source Code? Pin
Murat YILMAZ23-Jun-06 4:18
MemberMurat YILMAZ23-Jun-06 4:18 
GeneralRe: Source Code? Pin
Philipp Sumi26-Jun-06 0:50
MemberPhilipp Sumi26-Jun-06 0:50 
GeneralRe: Source Code? Pin
olivabianco30-Jun-06 10:29
Memberolivabianco30-Jun-06 10:29 
GeneralRe: Source Code? Pin
Murat YILMAZ4-Jul-06 4:57
MemberMurat YILMAZ4-Jul-06 4:57 
QuestionLicense? Pin
mgaerber23-Jun-06 1:59
Membermgaerber23-Jun-06 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.