简体   繁体   中英

Data Access Layer in .net

I am looking for sample applications or some articles showing how to implement a data access layer using NHibernate or Entity Framework 4.0. The application contains a lot of logic with DB, but I don't want to move this logic into stored procedures or "smudge" this logic between layers (BLL and DAL). I am looking for nice examples how it could be implemented in real life application.

Both

Patterns of Enterprise Application Architecture look at the repository

Nhibernate:

EF 4

That's quite a big question, and there are lots of approaches, but this article gives a nice introduction to two patterns using NHibernate http://www.primaryobjects.com/CMS/Article119.aspx . There are also many articles available online that describe a more generic NHib repository approach.

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