|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Announcements
Services
Chapters
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionHere 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. The target of this tool, if you are using the NHibernate, is that you need to write a lot of persistent class and XML mapping for each persistent class. Also, you need to write the NHibernate config file. At this point, to use this tool you can automatically create all these files in a few seconds. InstallingAfter you download the installation files, unzip the file and open the folder. Then you will see the following file and folder:
Open setup.exe and you will see the following interface:
Click Run and it will install itself; it will take a few seconds. UsingAfter 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 4 tab screens on the tool. 1 - Connection: This screen allows you connect your database with connection parameters. It seems like the Visual Studio connection wizard. You need to set some parameters to connect your database.
2 - 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." ![]()
3 - 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, namespace and assembly names.
4 - Generate: At the end of this, we can start the generate process. Just click Run and wait a few seconds. You can view all process details in the section.
After the succesfully you've completed the generating process, you can see generated files in the Project folder. If you selected "Copy Nhibernate DLL to project" and other DLLs, the generator will copy it and create a NHibernate config file to your project's "bin" folder.
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:
Let's check it out how it's looking. Persistent Class
Mapping XML File
The Next Version will Support...
|
||||||||||||||||||||||