Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 106173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:33:18+00:00 2026-05-11T01:33:18+00:00

I have an existing asp.net webforms project that uses Microsoft’s Enterprise DAAB for the

  • 0

I have an existing asp.net webforms project that uses Microsoft’s Enterprise DAAB for the DAL, I need to implement some extensive features, and I would like to use NHibernate to make things easier.

Is there any design patterns/architectures out there that allow a hybrid DAAB/NHibernate DAL ? is it a good idea ?

My thinking is: if I had a hybrid DAL I could still pass high traffic/un-dynamic queries through the DAAB side and save the overhead of the dynamic sql generation. But still have nhibernate for more complex queries.

Additionally what is the best way to setup NHibernate DAL/BLL for an asp.net webforms application ? I have read the tutorial on the NHibernate site and several others there doesn’t seem to be a consensus on starting/ending the nhib session. I’m just looking for best practice example.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:33:19+00:00Added an answer on May 11, 2026 at 1:33 am

    One approach I’ve heard about is use nHibernate for when your interact with your domain model. Keep in mind nHibernate can call stored procedures so if you want to avoid the SQL Generation you can but I’d advise against.

    If you have queries for reporting or displaying data that you don’t want to create custom entities from then you could use DAAB, althought I would not recommend doign this if your going to create your entities.

    As for best practice, I’ve found that creating the Session when you need it, and then store it in httpContext, you will close the session on every reqyuest.

    The only other thing then is to specificly create and end a transaction which I would do in your service layer or application tier if your logic would span multiple services (I define a service not as a webservice but as a high level piece of code which shields your application from your domain layer).

    A good starting point is from Billy McCafferty’s article here: http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx

    There is a bug / limitation within his code check out my blog post if you use his method: http://jberke.blogspot.com/2008/10/nhibernate-transaction-session-mgmt.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 78k
  • Answers 79k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Try this. May 11, 2026 at 3:58 pm
  • added an answer You should use an inline tag like <span> May 11, 2026 at 3:58 pm
  • added an answer Does it have to be done within vim? Could you… May 11, 2026 at 3:58 pm

Related Questions

I have an existing asp.net webforms project that uses Microsoft's Enterprise DAAB for the
I am working on a software development project that uses code written primarily in
I have a legacy (haha) ASP.Net Webforms Web Site Project in Visual Studio 2008
In normal WebForms scenario, any root-relative URLs (e.g. ~/folder/file.txt) inside CSS files such as:
I have to integrate an existing, simple asp.net web forms app including postbacks etc.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.