工作/存储库经理NHibernate的单位? [英] Unit of work/repository managers for NHibernate?

查看:115
本文介绍了工作/存储库经理NHibernate的单位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我白天一个.NET开发人员,但都被使用Rails和Merb的工作在过去的一年对我自己身边的项目,所以当它涉及到MVC和奥姆斯,我更习惯于给他们,并使用ActiveRecord和DataMapper的。

I'm a .NET developer by day, but have been working with Rails and Merb for the past year on my own side projects, so when it comes to MVC and ORMs, I'm more used to them and using ActiveRecord and DataMapper.

我开始使用ASP.NET MVC,我喜欢我在NHibernate和流利的NHibernate的看,但是更多的四处寻找一点点如何最好地处理工作或存储库类型模型的单位。

I'm getting started with ASP.NET MVC, and I like what I see in NHibernate and Fluent NHibernate, but looking for a little bit more around how to best handle the unit of work or repository type model.

我想要的东西是不是对建筑巨大。我见过最喜欢S#ARP建筑的一些项目,但它看起来有点臃肿。

I'd like something that is not huge on architecture. I've seen some projects like S#arp Architecture, but it looks kind of bloated.

我真正感到之后是管理连接和处理数据检索/存储的简单方法。一个简单的指南或示例应用程序甚至就足够了。

All I am really after is a simple way to manage connections and handling data retrieval/storage. A simple guide or sample application would even suffice.

推荐答案

有可用于工作实现方便单位几个组件:

There are a few components you can use for easy Unit of Work implementations:

  • NHibernate Burrow - part of the NHContrib project
  • Rhino Commons - Unit of Work implementation, documentation is in sample code, on the blog and on the web
  • Conversation per Business Transaction - from Fabio Maulo, a primary nhibernate developer, with some documentation on his site

至于样本项目,<一个href=\"http://blog.pragmasql.com/post/NHibernate-20-Sample-Project-using-NHibernateBurrow-contribution.aspx\">here是一个地洞。我使用的陋居的一个项目,现在和它的工作对我罚款。虽然我不使用他们,有利用工作会话管理的单元库类,所以它是很容易得到它去。我还用流利的NHibernate和它的直接的把一切工作在一起。

As for sample projects, here is one for Burrow. I am using Burrow for a project right now and it's working fine for me. Although I don't use them, there are repository classes that use the unit of work session management, so it is really easy to get going with it. I also use Fluent NHibernate and it's straightforward to get everything working together.

这篇关于工作/存储库经理NHibernate的单位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆