开发者

Data Access Layer in .net

开发者 https://www.devze.com 2023-01-30 13:18 出处:网络
I am lo开发者_高级运维oking 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

I am lo开发者_高级运维oking 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:

  • https://github.com/sharparchitecture/Sharp-Architecture - an architecture using NH and looking to use EF later
  • https://github.com/jongeorge1/Who-Can-Help-Me - I like this, its built on top of Sharp Arch
  • big list of NH projects have a look some are systems http://nhforge.org/wikis/general/open-source-project-ecosystem.aspx

EF 4

  • http://www.dofactory.com/Framework/Framework.aspx - have to pay for
  • http://microsoftnlayerapp.codeplex.com/ - Ntier app


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消