Thursday, November 18, 2010

DNN Module development Using Nhibernate

Introduction
Hi All this is my first blog on Tricky Coders. In my last project which is in asp.net and I have used Nhibernate as the ORM which is very stable and also an open source project like DotNetNuke. So I decided to used it with DNN.
Prerequisites
Please download latest verion of NHibernate.
  1. Nhibernate.dll -This contains the NHibernate framework
  2. Iesi.Collections.dll -Iesi.Collections.dllContains the definition of some special collections used by NHibernate
  3. Castle.Core.dll-Base library is needed by Castle.DynamicProxy2.dll
  4. Castle.DynamicProxy2.dll - This contains code to generate proxies and is used by NHibernate to make e.g. lazy load possible
  5. We need to make some modifications in the web.config to support the Nhibernate.
Getting Started with Module Development
To create my module in DotNetNuke using Nhibernate i have used 2 projects
  1. DataAccessLayer- This class library project serves the purpose to connect with database by creating the object of Session Factory.
  2. Mapping Classes- This Class Library project serves the purpose of Defining the Entites and their mapping xml files.
  3. My Actual module which refer the above Projects to talk with data base.

Download 
    You can  download this module's source and installation package from tricky coder's codeplex project


    Please let me know about your views and suggestions to improve the code.

    Hope this will help.

    1 comment:

    Please add your valuable comments about this post if it helped you. Thanks

    Popular Posts