简体   繁体   中英

What is the best businessmodel when using NHibernate to access the database?

I'm starting to use NHiberante as a dataaccess tier.
I'm used to work with the repository model as a business model.

This means, my domain model (not really a tier), my asp.net application tier, my repository tier which finally uses my dataaccess tier.

But with what I've learned by now (on NHibernate) I know that many logic is done within an ISession so I was wondering if NHibernate could be used within the repository tier.

Or perhaps there are even better ways to use NHibernate. Does anyone know where I could find a propriate example of how to use NHibernate in an webapplication?

Cheers, M.

S#arp体系结构是使用NHibernate的完整示例或Web体系结构。

You can use Nhibernate with Linq extension. By using Linq, you can write your logic in your service layer and repository only get items IQuerable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM