Unit of work/repository managers for NHibernate?

前端 未结 3 1014

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 u

3条回答
  •  青春惊慌失措
    2021-02-04 17:50

    All I am really after is a simple way to manage connections and handling data retrieval/storage.

    Yes, NHibernate can be pretty verbose. I've investigated both the Unit of Work and Repository "patterns" (they're actually "facades" but that's another story) and wrote very simple implementations of them. They both greatly simplify NHibernate, but I'd suggest using the Unit of Work implementation since I feel it's generally more performant and easier to use than Repository. Download it and give it a try:

    http://code.google.com/p/nhibernate-unitofwork-example/

提交回复
热议问题