Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,128 | Comments: 45,549

filter by tags archive

Hibernating Rhinos - Episode #4: Hibernating Forums - Part I - Testable & Painless Persistence

time to read 1 min | 150 words

Okay, here is the first episode in my OR/M challenge series. It mostly deals with the MonoRail skeleton project and with setting up the domain model in a TDD fashion. I am not sure how interesting it is, because about 60% of it is building the Active Record entities, and explaining how it works, but it lays a foundation that I will use for the next few episodes.

Lots of Um..., I am afraid, but at least I am speaking in a normal speed :-)

  • Total length: 55:44 Minutes
  • Download size: 77Mb
  • Code starts from ~4 minutes into the episode.
  • Getting the Latest code - will be updated for new episodes
  • Getting the Code from the episode

The download page is here: http://ayende.com/hibernating-rhinos.aspx

I have some ideas about where to take the next episode, but this is something that is mostly dependant on your feedback :-)



This is awesome stuff. I finally got around to watching Episode #3 (hope to have some blog comments about it), and hope to backtrack to #2, but this is really, really helpful to me, and I hope to other people in the community.

And you always comment about not being a native English speaker, and it does bring about a few humorous moments, but I think your presentations are actually very easy to follow.

Thanks for this.

Ben Scheirman

The more of these you do, the more natural your English sounds. Keep it up!

Ayende Rahien


Hi, not fair to reveal my nefarious plans in the open!

Tim Haines

Thanks very much Ayende. I picked up a few good tips (several reshaper ones too) from this screencast. I'll be taking your UnitOfWork for a test drive this weekend. Oh - I also had no problems at all understanding everything you said. I had to pause and rewind a few times to see what you'd added to the code though. :-)

The Repository pattern is interesting. I remember reading about it in EE's book (or was it Fowlers?), and thinking it sounded like too much work when Active Record (and the previous O/RM I used) did it all for you. I'm looking forward to seeing how you extend one to add class specific find methods.


Very interesting, thanks!


500 An error occured:

ComponentActivator: could not proxy Cuyahoga.Modules.Downloads.DownloadsModule


Awesome article

Can you discuss more best practices if we have deep object graph/hierarchies.

Yoni G


Can u please recommend me of a good quickstart article to start using Rhino Mocks? Thanks, Yoni.

Ayende Rahien

The first Hibernating Rhino screen cast is a good start, I think

Joe Fiorini

I haven't gotten to watch the rest of your video yet, so I apologize if this was already mentioned.

How would you recommend testing custom Find methods implemented in an Active Record layer, such as:


public class Employee{


     public Employee FindByUserId(string userId){

         return Employee.FindFirst(Expression.Eq("UserId", userId));



My first thought is to extract that find into an interfaced service layer and then mock the service in my test project to call the in memory persistence instead of ActiveRecord's Find/Save methods. What are your thoughts on that?


Ayende Rahien

I dealt with the subject here:


Comment preview

Comments have been closed on this topic.


  1. The worker pattern - 2 days from now

There are posts all the way to May 30, 2016


  1. The design of RavenDB 4.0 (14):
    26 May 2016 - The client side
  2. RavenDB 3.5 whirl wind tour (14):
    25 May 2016 - Got anything to declare, ya smuggler?
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series


Main feed Feed Stats
Comments feed   Comments Feed Stats