NHibernate and the Unit of Work Pattern

Introduction

Martin Fowler writes:

"When you're pulling data in and out of a database, it's important to keep track of what you've changed; otherwise, that data won't be written back into the database. Similarly you have to insert new objects you create and remove any objects you delete."

and

"A Unit of Work keeps track of everything you do during a business transaction that can affect the database. When you're done, it figures out everything that needs to be done to alter the database as a result of your work."

In NHibernate we have the Session object which is a Unit of Work (UoW) container. The session object keeps track of all objects you load, new objects you add, existing objects you delete and changes you make to any of these objects. Only when flushing the session will the database be altered (that is: will the necessary create, update and delete statements be sent to the database).

Now, working directly with the NHibernate session object makes absolute sense. But some times you rather want to abstract the data manipulation interface from a specific infrastructure implementation à la NHibernate.

Note: most of the design ideas and implementation details presented here originate from Ayende's UnitOfWork implemented in the Rhino.Commons which you can get here.

Design and Implementation (TDD)

Some thought about TDD

I want to implement a UnitOfWork pattern for NHibernate and I want to do it by using TDD. For a beginner (like I was myself not so long ago) it seems unnatural at the beginning. We introduce a huge overhead you might think. You might also think that we have to write at least double the code as when doing the development without TDD. But wait until you have to start to debug your application... or until the customer wants to have something changed in the application... or until you have to re-factor you application... Then you will immediately see and feel the benefits of a good test coverage.

Attention: Multi-Threading ahead

Please not that the implementation presented here is strictly NOT thread safe!!! I want to reduce the complexity of this first implementation. But I promise that in a following post I'll show you how to make the implementation of the unit of work pattern thread safe and thus useful for e.g. Web scenarios.

The UnitOfWork Class

To start with: I want to have an easy way to start a new UoW, in any place of my application have access to the current UoW and commit the business transaction represented by my UoW. We can do this with a static class called UnitOfWork

image

The method start creates and returns an instance of a UnitOfWorkImplementor class which implements the interface IUnitOfWork. As you can see then interface IUnitOfWork inherits from IDisposable. So we can define that the business transaction is ended when the UoW is disposed. Now, if we do nothing else then nothing should happen, that is no changes should be propagated to the database. To commit a business transaction we have to explicitly call a method of the UoW. Let's call this method TransactionalFlush. In doing so all changes recorded by the UoW are committed to the database in one go.

Now let's start to implement this! We are doing TDD, aren't we? So we will write our first test (if you are not sure how to best setup a new solution for TDD please consult this post). I define a new solution with two projects as follows

image

Add a class UnitOfWork_Fixture.cs to the test project and implement the first test like this

[TestFixture]
public class UnitOfWork_Fixture
{
    private readonly MockRepository _mocks = new MockRepository();
 
    [Test]
    public void Can_Start_UnitOfWork()
    {
        IUnitOfWork uow = UnitOfWork.Start();
    }
}

Of course this test will not compile since you don't have the types UnitOfWork and IUnitOfWork defined yet. Let Resharper create them for you (or implement them by hand)

public static class UnitOfWork
{
    public static IUnitOfWork Start()
    {
        throw new NotImplementedException();
    }
 
    public static IUnitOfWork Current { get; private set; }
}
 
public interface IUnitOfWork : IDisposable
{
}

Now the test will compile but it will fail! Of course, you haven't implemented the Start method so far. In this method we must now create a new UoW and return it to the caller. A UoW is a complex beast and should therefore be constructed in a factory. So let's define a factory Interface IUnitOfWorkFactory with a method Create which returns a UoW implementing the interface IUnitOfWork.

public interface IUnitOfWorkFactory
{
  IUnitOfWork Create();
}

since we want to test our UnitOfWork class in isolation we have to mock all other dependencies line the unit of work factory. I'll use Rhino.Mocks as my mocking framework (Please refer to documentation here). I want to test that when calling the start method of the UnitOfWork class the factory gets called. So I extend my test function

[Test]
public void Can_Start_UnitOfWork()
{
    var factory = _mocks.DynamicMock<IUnitOfWorkFactory>();
    var unitOfWork = _mocks.DynamicMock<IUnitOfWork>();
 
    // brute force attack to set my own factory via reflection
    var fieldInfo = typeof(UnitOfWork).GetField("_unitOfWorkFactory", 
        BindingFlags.Static | BindingFlags.SetField | BindingFlags.NonPublic);
    fieldInfo.SetValue(null, factory);
 
    using(_mocks.Record())
    {
        Expect.Call(factory.Create()).Return(unitOfWork);
    }
    using(_mocks.Playback())
    {
        var uow = UnitOfWork.Start();
    }
}

In the first two lines of code I mock the external dependencies of the UnitOfWork class. Then I do something you should not do very often (but I have good reasons doing so here and I promise it's the only time I'll do it in this project...). I set a private field of the UnitOfWork class with a value by using reflection. I could implement a public setter in the class but as I would only need it for this test and I want to keep the class interface as simple as possible I chose to do it via reflection.

In the  record phase I define my expectation (namely that the factory create method is called) and in the playback phase I invoke the Start method which I want to test. The test will compile but fail to execute. I have not yet defined the private static field _unitOfWorkFactory and I also do not call the factory. So let's modify our code...

public static class UnitOfWork
{
    private static IUnitOfWorkFactory _unitOfWorkFactory;
    private static IUnitOfWork _innerUnitOfWork;
 
    public static IUnitOfWork Start()
    {
        _innerUnitOfWork = _unitOfWorkFactory.Create();
        return _innerUnitOfWork;
    }
 
    public static IUnitOfWork Current { get; private set; }
}

now the test will pass.

Since in all our test regarding the UnitOfWork class we will always need it with an injected factory we define a new test fixture with a context setup for our specific needs. We put the respective code in the SetupContext and TearDownContext methods

[TestFixture]
public class UnitOfWork_With_Factory_Fixture
{
    private readonly MockRepository _mocks = new MockRepository();
    private IUnitOfWorkFactory _factory;
    private IUnitOfWork _unitOfWork;
 
    [SetUp]
    public void SetupContext()
    {
        _factory = _mocks.DynamicMock<IUnitOfWorkFactory>();
        _unitOfWork = _mocks.DynamicMock<IUnitOfWork>();
 
        // brute force attack to set my own factory via reflection
        var fieldInfo = typeof(UnitOfWork).GetField("_unitOfWorkFactory",
            BindingFlags.Static | BindingFlags.SetField | BindingFlags.NonPublic);
        fieldInfo.SetValue(null, _factory);
 
        _mocks.BackToRecordAll();
        SetupResult.For(_factory.Create()).Return(_unitOfWork);
        _mocks.ReplayAll();
    }
 
    [TearDown]
    public void TearDownContext()
    {
        _mocks.VerifyAll();
    }
}

Note: in the second last line of the SetupContext method we define that each time the method Create of the factory object is called (by the UnitOfWork Start method) we want it to return our predefined mocked _unitOfWork instance.

Trying to start a UoW if there is already one active should throw a meaningful exception. This is the test

[Test]
public void Starting_UnitOfWork_if_already_started_throws()
{
    UnitOfWork.Start();
    try
    {
        UnitOfWork.Start();
    }
    catch (InvalidOperationException ex)
    { }
}

As a consequence we have to extend our Start method in the UnitOfWork class

public static IUnitOfWork Start()
{
    if (_innerUnitOfWork != null)
        throw new InvalidOperationException("You cannot start more than one unit of work at the same time.");
    
    _innerUnitOfWork = _unitOfWorkFactory.Create();
    return _innerUnitOfWork;
}

Now I have another problem: After the test is finished the static field _innerUnitOfWork of my UnitOfWork class is set to a value other than null. This will have a undesired side effect to the following test. I have to reset this field. Again in this special case I'll do it via reflection to not clutter the interface of my class (static classes are difficult more complex to deal with in TDD than non static classes...). We do reset our UnitOfWork class in the TearDownContext method

[TearDown]
public void TearDownContext()
{
    _mocks.VerifyAll();
 
    // assert that the UnitOfWork is reset
    var fieldInfo = typeof(UnitOfWork).GetField("_innerUnitOfWork",
        BindingFlags.Static | BindingFlags.SetField | BindingFlags.NonPublic);
    fieldInfo.SetValue(null, null);
}

Next we want to be able to access the current unit of work. As usual we first implement a test

[Test]
public void Can_access_current_unit_of_work()
{
    IUnitOfWork uow = UnitOfWork.Start();
    var current = UnitOfWork.Current;
    Assert.AreSame(uow, current);
}

You can figure out what code you need to implement for the test to pass.

We also want to assert that when accessing the current UoW if no UoW has been started that a meaningful exception is thrown

[Test]
public void Accessing_Current_UnitOfWork_if_not_started_throws()
{
    try
    {
        var current = UnitOfWork.Current;
    }
    catch (InvalidOperationException ex)
    { }
}

now my implementation of the Current property in the UnitOfWork class is as follows

public static IUnitOfWork Current
{
    get
    {
        if (_innerUnitOfWork == null)
            throw new InvalidOperationException("You are not in a unit of work.");
        return _innerUnitOfWork;
    }
}

Next we want a property on the class which tells us whether a UoW is started or not. The test for it

[Test]
public void Can_test_if_UnitOfWork_Is_Started()
{
    Assert.IsFalse(UnitOfWork.IsStarted);
 
    IUnitOfWork uow = UnitOfWork.Start();
    Assert.IsTrue(UnitOfWork.IsStarted);
}

It's getting boring isn't it... But this is the way TDD works. You always think (hard) on what you need and then you implement the test with which you can proof that you get it as you want it. Only then you implement the functionality needed to fulfill the test. If you do so you automatically follow the YAGNI principle (you ain't gona need it) that is you only implement the code you really need!

We can fulfill the test like so

public static bool IsStarted
{
    get { return _innerUnitOfWork != null; }
}

The UnitOfWork class is now a perfect wrapper for the NHibernate session object. Though for some advance scenarios I would like to have access to the session object related to my UoW. As a consequence I'll implement a read only property CurrentSession in the UnitOfWork class. Lets again start with the test

[Test]
public void Can_get_valid_current_session_if_UoW_is_started()
{
    using (UnitOfWork.Start())
    {
        ISession session = UnitOfWork.CurrentSession;
        Assert.IsNotNull(session);
    }
}

and the implementation

public static ISession CurrentSession
{
    get { return _unitOfWorkFactory.CurrentSession; }
    internal set { _unitOfWorkFactory.CurrentSession = value; }
}

Note that I have just delegated the call to the factory class. Thus to make the test pass I have to add two additional lines to the SetupContext method of the test fixture where I mock a session object and setup the result for a call to the property CurrentSession of the factory.

[SetUp]
public void SetupContext()
{
    _factory = _mocks.DynamicMock<IUnitOfWorkFactory>();
    _unitOfWork = _mocks.DynamicMock<IUnitOfWork>();
    _session = _mocks.DynamicMock<ISession>();
 
    // brute force attack to set my own factory via reflection
    var fieldInfo = typeof(UnitOfWork).GetField("_unitOfWorkFactory",
        BindingFlags.Static | BindingFlags.SetField | BindingFlags.NonPublic);
    fieldInfo.SetValue(null, _factory);
 
    _mocks.BackToRecordAll();
    SetupResult.For(_factory.Create()).Return(_unitOfWork);
    SetupResult.For(_factory.CurrentSession).Return(_session);
    _mocks.ReplayAll();
}

That's all we need for the moment regarding the UnitOfWork class. Next topics will be the the implementation of the UnitOfWorkFactory class and then of the UnitOfWorkImplementor class. The details will be presented in the next post to this blog. So keep ready...

Code Repository

We have prepared a code repository on Google code dedicated to this blog. If you want you can download the whole project from here and play with it. Note that this is a Visual Studio 2008 type solution and is based on C# 3.0.

Any comments are really welcome!

Enjoy

Blog Signature Gabriel .

Print | posted on Thursday, April 10, 2008 9:51 PM

Comments on this post

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Gabriel, another great article...keep them coming!!
Left by Sean Kearon on Apr 12, 2008 9:30 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Nice post.
I've implemented a similar abstraction as well, but, I do have a question concerning your post.
In your requirements you say:
[quote]I want to have an easy way to start a new UoW, in any place of my application have access to the current UoW [/quote]
But ... what is the current Unit Of Work ? This sentence implies that you can only have one UoW at a time ?
Is it not possible to have multiple concurrent UoW 's ?

In a Web-scenario, I guess it is valid to say that there's only one active UoW per session (all action takes place when the page is loaded, so you can get away with one UoW).

However, in a Windows Application, it is -imho- very possible to have multiple concurrent UoW's by a single user ?
Left by Frederik Gheysels on May 01, 2008 10:41 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
@Frederik: Yes you are right. In a windows application it often makes sense to have many (concurrent) UoW's. It's easy to improve the implementation in this regard. But I leave it as an exercise to the reader... (hint: for a possible solution take a look at the "Rhino Commons" of Ayende)
Left by Gabriel Schenker on May 06, 2008 10:40 PM

# Re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
I agree with Frederik. By this design you'll have only one active current unit of work at most! I didn't get this also when I read Ayende implementation, although I'm a fan of his work. In my humble implementation of UnitOfWork pattern, I can create as many as required units, each of them has separate session and transaction context. They are used as disposable units to handle atomic transactions. So, I use them in business layer and also in ASP.NET presentation layer, if required. In your design, What if two users/methods used the same unit and one of them got an exception and needs to rollback work?! Is not that will rollback the whole UnitOfWork, according to the unit of work concept?!
Left by Waheed Sayed on May 17, 2008 10:59 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Gabriel, as you said, the session in nhiberbnate is a UoW container. I don't understand why you create a wrapper, and then keep using the ISession interface. Wasn't the idea to decouple the application from nhibernate?
Left by Igor on Jun 20, 2008 11:53 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
@Igor: Indeed, on of the goals of this implementation is to decouple the client code from the specifics/details of NHibernate. The client code should not have to care about how setting up / initializing NHibernate but just declaring that it wants to start a unit of work, i.e.

using(UnitOfWork.Start){
DoSomeInterestingStuff();
...
}

Now, inside the "DoSomeInterestingStuff" I normally use repositories (-->Repository pattern) to query and/or change my objects. Again the repository hides the details of persistance related stuff from my client code.

In some advance scenarios though I explicitly want to have access to the underlying persistance library (here NHibernate) from my client code. But this is rather an exception and not used evey day.
Left by Gabriel Schenker on Jun 22, 2008 6:43 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
I like TDD too, but the topic is Unit of Work. I find all the 'mocking' and 'TDD' discussion to be a distraction from the topic of 'Unit of Work'

Kinda like the SRP here in a topic, please keep it to Unit of Work and teach TDD/Mocking elsewhere

:)

Thanks
Left by Steve on Jul 03, 2008 3:56 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
@TDD: I'm a strong believer that applying TDD increases the quality and maintainability of your code. On the other hand very few people really apply TDD in their daily job. In showing how to develop new stuff with TDD I want to show some advantages of it to the wider community and inspire them to do so as well...
On the other hand: not doing TDD just seem "unnatural" to me nowadays.
Left by Gabriel Schenker on Jul 03, 2008 4:49 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Hi!your article is great!
I want to translate it to mother tongue - Chinese and post it at my blog, may I?
Left by pellet on Mar 02, 2009 9:51 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Thanks for these articles!

However, I'd like to second one of the other readers, and ask for TDD stuff to be seperated out - it just makes the concept being studied foggier...
Left by Sosh on Mar 10, 2009 1:59 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
TANKS FOR WEBSITE
Left by saman on Mar 11, 2009 8:04 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Gabriel, you said

"Now, inside the "DoSomeInterestingStuff" I normally use repositories (-->Repository pattern) to query and/or change my objects. Again the repository hides the details of persistance related stuff from my client code."

But IRepository references NHibernate objects such as DetachedCriteria and ICriterion. Therefore neither the UoW or the Repositories are decoupled from NHibernate!

Therefore, I fail to see the point!
Left by Patrick on Mar 25, 2009 1:38 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
@pellet: Of course you may translate the post. Just link back to this article ;-)
Left by Gabriel N. Schenker on Apr 05, 2009 11:46 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
@Patrick: I do not understand! Where did I couple my repository interface to a detached criteria or an ICriteria interface?
Left by Gabriel N. Schenker on Apr 05, 2009 11:49 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
First of all the whole FAQ is very good writen. Very good job!
Steve complains about interfering UOW with mocks and TDD. But i also think it is a good think to explain all together to inspire people. At least for me it worked! Thanks


One comment on the tests that expects an exception. I am new to NUnit, but i thinke the tests will succeed if no exceptions are thrown? Or am I missing somethink?

e.g. Starting_UnitOfWork_if_already_started_throws

shouldn it be somethink like:

[Test]
[ExpectedException(typeof(InvalidOperationException))]
public void Starting_UnitOfWork_if_already_started_throws()
{
UnitOfWork.Start();

UnitOfWork.Start();

}

(ExpectedExceptions seems not to work with Resharper, but with the nunit.exe)
Left by Sven Neubert on May 10, 2009 1:58 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Excellent article. We'll shortly be going back to our implementation, and taking a proper TDD approach as per above. We're currently deciding whether to just make our own Session class contain the TransactioScope, or create two classes, a UoW class which contains a Session.

I disagree with the comments regarding the article and TDD. It shows case by case functionality being added.

And also to develop not using TDD, seems a bit unnatural to me too. I just can't understand how or why people develop without defining the behavior in test cases first. It's the age old, focus on quality and speed will naturally come. Right crap code, and speed will decrease next time you visit it.
Left by Rob on Sep 10, 2009 12:28 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
The identity field saves a database ID field in an object to maintain identity between an in-memory object and a database row." And further he states: "The first concern is whether to use meaningful or meaningless keys. A meaningful key is something like the U.S. Social Security Number
Left by Orkut Greetings on Nov 16, 2009 10:38 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
But ... what is the current Unit Of Work ? This sentence implies that you can only have one UoW at a time ?
Is it not possible to have multiple concurrent UoW 's ?
Left by pandora jewelry on Dec 24, 2009 11:53 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Could you provide working example of this solution when UnitOfWork is runned by separated thread started within web application context? and some directions on how to map an order attribute? In my I must save the order of the child nodes.
Left by http://www.myonline-poker.com/ on Dec 29, 2009 4:44 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
i confer
Left by make money online on Jan 16, 2010 1:13 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Saying thanks will not just be sufficient, for the wonderful clarity in your writing. I will immediately grab your rss feed to stay privy of any updates.
Left by best weight loss pills on Jan 17, 2010 9:08 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Sven,
If you are using NUnit, instead of using the ExpectedException attribute you can use Assert.Throws() like this:

[Test]
public void Starting_UnitOfWork_if_already_started_throws()
{
UnitOfWork.Start();

Assert.Throws(() => UnitOfWork.Start());

}
Left by chris on Jan 20, 2010 10:19 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Sorry, generic did not show up, should be:

Assert.Throws[lessthan]InvalidOperationException[greaterthan](() => UnitOfWork.Start());

Hope that makes sense. :)
Left by chris on Jan 20, 2010 10:24 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Useful information like this one must be kept and maintained so I will put this one on my bookmark list! Thanks for this wonderful post and hoping to post more of this!
Left by Forex Video on Jan 20, 2010 10:41 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
Left by Auto Reviews UK on Jan 27, 2010 1:42 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Really useful Post. keeping current situation in mind. Great stuff as usual...
Left by Attorney Ft. Lauderdale on Jan 27, 2010 1:54 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Nice work. Very informative article. I will love to bookmark you for the future preferences. Thanks for sharing.
Left by Loyalty Programs on Jan 27, 2010 2:22 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
What's more, a bracelet can also be equipped with different small pandora jewelry and even you can change it according to your mood at any time. Here are some meanings of pendant. Small Plane stands for traveling and adventure ; anchor, stability and hope; your baby's boots, having a lot of babies; small feeding pandora bracelets abundant food; Church means happiness and stability of marriage; dragonfly means riches; Eiffel Tower means travel and exploration; four-leaf clover means fortune; horseshoe means luck; Nest means a happy family; bride shows a happy bride in her coming pandora jewelleryship steering shows calming and confidence; pandora ukcoin pandora beadsshows rich marriage life. Wish bone, dreams being about to come true; pandora charm bracelets, love; one heart shot by an arrow, romantic love; purse, wealth; and heart-shaped lock, true love.love
Left by pandora jewelry on Jan 28, 2010 3:56 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
I do not know how to do this abstraction but interesting anyway
Left by forex software on Feb 04, 2010 1:31 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
I’ve been most successful using your last suggestion. Nothing else has worked. I’m unable to “stack” these for some reason, so I’d love to figure that out, but thanks for the tips so far. order essay
Left by Ben on Feb 07, 2010 1:12 AM

# re: NHibernate and the Unit of Work Pattern

Left by ugg boot on Feb 08, 2010 7:00 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
The difference between the right word and the almost right word is really a large matter — it's the difference between a lightning bug and the lightning.
Criminal Justice school | cyber crime degree | Education degree | Online Engineering school | Aerospace Engineering degree
Left by siomy on Feb 09, 2010 10:01 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Thanks for such a great post and the review, I am totally impressed! Keep stuff like

this coming.
Left by kanchan on Feb 10, 2010 10:30 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Dealing with a database can definitely be tricky. I think this will work well if used properly.
fort lauderdale motorcycle accident attorney
Left by james lee on Feb 11, 2010 6:05 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
First off, I love this web site. Great reviews and it’s helped me find a lot more of what I like. I have a variety of topics including information on Used tractor values and yanmar tractor parts
Left by Thorlo socks sale on Feb 16, 2010 1:25 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Really nice information just like i provided for Coffee of the Month Clubs and Gourmet Coffee Clubs
Left by Gourmet Coffee Clubs on Feb 17, 2010 7:34 PM

# re: NHibernate and the Unit of Work Pattern

Left by ny prom limo on Feb 18, 2010 12:22 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Very cheap, very seductive, to echocardiography. Strongly recommended! ! !panora jewelry
panora jewelry
panora jewelry
Left by pandora jewelry pzm on Feb 21, 2010 2:42 PM

# re: NHibernate and the Unit of Work Pattern

Left by Wilson on Feb 21, 2010 4:12 PM

# re: NHibernate and the Unit of Work Pattern

Left by cheap picture frames on Feb 22, 2010 6:05 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Thats a nice tutorial on how the unit of work pattern actually works
Left by Guarana Supplements on Feb 22, 2010 7:36 PM

# re: NHibernate and the Unit of Work Pattern

Left by custom essay writing on Feb 22, 2010 10:21 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
If you live in Ontario and drive a car, you are likely paying high insurance premiums. If that is the case then Kanetix insurance marketplace may help you lower your insurance bill.
Left by ontario auto insurance on Feb 24, 2010 5:28 AM

# star trek credits

Requesting Gravatar...
Do you knowstar trek credits?if you play the online game,you will knowstar trek online creditsis the game gold. In the game,if you had morestar trek gold,you will had a tall level. But if you wantsto credits,you can come here and spend a little money to boughtstar trek online gold.Quickly come here.
Left by star trek credits on Feb 24, 2010 1:37 PM

# discount Ugg Broome Boots in chestnut leather online sales

Requesting Gravatar...
YS0225A8 Before there was no reason in the world,As now there is!The moncler jackets course of waer was my only course,My repetitions oceans' sough and swell ugg adirondack boots!My seasons pleasurable,Before there was no reason in the world,As now there is ugg broome boots!To measure time from sleep I rose to sleep,To measure space I pastured on surprise http://www.edhardy-buy.com/,O meadows of resemblances,I was the grove on whose mosaic floors,The moncler online seeds of otherwise were spent,My gods had many arms,I was the Caesar of unmarshaled grass ugg boots!Faustus in the branches,My first ambitions were my sorrows long!Before there was no reason in the world,As now there is!
Left by discount womens moncler jacket on Feb 24, 2010 11:01 PM

# discount air jordan shoes 23 sales online

Requesting Gravatar...
YS0225A7 when the sun hugs the moon, the sky clses her eyes.when the sun hug the moon the sea quiet her jordans shoes.when the sun hugs the moon,the forest stops her susurrus.when the sun hugs the nike sb dunk high,the desert hodlds her breathe.Thousands of years's waiting is only for this nike acg shoes moment.Never be disappointed.Never give up.It hax been sucha lng time.At nike air max 2003 this momentmeet each other in course of time.Do not cry,Moon.I guard you forever.Cause you are in my life,everyting has its meaning.The fascinating Diamond Ring,is the ring i give you,May it give you warm http://www.nikejordanshoes2sell.com/ threduce your tears.Do not cry,Sun,I will be there with you forever/Meeting you has given me precious memeory.The resplendent Baily Beads.is the gem i give you .May i give you cheap air jordan 22 shoes strength, shine in your morning.Meet soon and part soon.It makes peop;e retrospect in spite of lasting a few minutes.A long times waiting is coming.Don't know when the next meeting is .When the sun hugs the Moon. the Moon hugs the sun as well Hugging tightly,regian the lost nicety.
Left by discount nike air max shoes sale on Feb 24, 2010 11:05 PM

# discount air jordan shoes 25 sales online

Requesting Gravatar...
YS0225A6 When you belive,Though hope is frail.It's hard to kill,Who knows what cheap prada shoes miracles,You can achieve,When you belive! Somehow you will,

You will when you belive new nike air max!And in this time of fear, When prayer so often proves in vain, Hope seems like the http://www.nikeaf1jordanshoes.com/summer birds. Too swiftly flow away, And now I am standing wholesale gucci shoes here.My heart's so full I can't explain.Seeking faith and speaking women's nike shox words I never thought I'd say, They don't always happen when you ask authentic air jordan shoes.And it's easy to give in to your fear. But when you're blinded by your pain!
Left by discount mens moncler down coat on Feb 24, 2010 11:10 PM

# discount ed hardy women long sleeve shirts sales online

Requesting Gravatar...
YS0225A5 If you think you are beaten, you are! If you think you dare noted hardy clothing, you don't! If you want to win but think you can't, It's almost a cinch you won't ed hardy hoodies! If you think you'll lose,you're lost! For out of the world we find.Success begins with a fellow's will,It's all in a ed hardy shirts state of mind! Life's battles don't always go.To the stronger and faster ed hardy coats man,But sooner or later the man who wins,Is the man who thinks he can! When Yelive http://www.edfashionclothes.com/,Many night we've prayed!With no proof anyone could hear!In our heart a hopeful moncler online store song,we barely understood!Now we are not afraid !Although we know there's much to fear!We were moving the moncler jackets mountian long,Before we knew we could!There can be miracles!
Left by discount mens moncler down coat on Feb 24, 2010 11:13 PM

# discount christian louboutin sandals online sales

Requesting Gravatar...
YS0226A1 That your heart has been broken,Hear the wo,I'm here, my child,;And know your christian louboutin uk angel has spoken.For even in the darkest hour,When all of discount louboutin shoes hope seems gone,They'll give you strength to live your life,And desire to go on.And if your faith in Heaven, Should ever fade away,They'll help renew your christian louboutin boots spirit, And help you find your way.Even though you're ever filled with doubt, About the christian louboutin pumps life you live,Know that they are there to give you All that they can give.For you see, the Father sent them,Because to Him, you mean so much,That He sent them just for you,my louboutin sale friend,And your life, they will touch.They will always be here,They will never leave your http://www.christianlouboutinshoestore.com/ side;And upon their strength and guidance,You always may rely.Take comfort in their guidance, Draw strength from up above,And know that their sweet presence,Is God's precious gift of love.
Left by cheap christian louboutin shoes on Feb 25, 2010 3:32 PM

# discount women's ugg elsey boots 5596 sales online

Requesting Gravatar...
YS0226A2 If I were a boy again, I would practice perseverance more ofen, and never give up a thing because it was ugg australia boots or inconvenient. If we want light, we must conquer darkness. Perseverance can sometimes equal genius cheap ugg boots in its results. “There are only two creatures,” syas a proverb, “who can surmount the pyramids—the eagle and the snail.” If I were a uggs sale boy again, I would school myself into a habit of http://www.topsnowboots.com/ attention; I would let nothing come between me and the subject in hand. I would remember that a good skater never tries to skate in two ugg cardy boots directions at once. The habit of attention becomes part of our life, if we begain early enough. I often hear cheap gucci shoes grown up people say “ I could not fix my attention on the sermon or ugg coquette book, although I wished to do so” , and the reason is, the habit was not formed in youth.
Left by cheap ugg upside boots 5163 on Feb 25, 2010 3:40 PM

# discount Women's ugg adirondack boots II sales online

Requesting Gravatar...
YS0226A3 Hold fast to dreams.For if dreams die. Life i a broken-winged bird,That ugg australia boots can never fly.Hold fast to dreams. For when dreams go,Life is a barren ugg tall boots field, Frozen only with snow !You never know until you try; And you never try unless you really try ugg cardy boot. You give it your best shot; You do the best you can. And if you have done everything http://www.uggsnowbootsbest.com/! In your power,and still,The truth of the uggs argyle knit matter is! That you haven\'t failed at all.When you reach for your dreams,No matter what ugg boots they may be,You grow from the reaching;You learn from the trying;You win from the doing.
Left by cheap ugg classic cardy boots on Feb 25, 2010 3:47 PM

# discount reebok nfl jerseys online sales

Requesting Gravatar...
YS0226A4 A true friend is someone who reaches for yor hand and touches your cheap hockey jerseys heart.There's always going to be people that hurt you,so what you have to do is keep on trusting nfl jerseys and just be more careful about who sport jerseys you trust next time around.Make youself a better person and know who you are discount nba jerseys before you try and know someone else and expect them to know you mlb jerseys on sale.Remember:Whatever happens,happens for a reason.How many people actually have 8 true http://www.nfljerseymlb.com/friends Hardly anyone I know.But some of us have all right friends and good friends.
Left by cheap adiads nba jerseys sale on Feb 25, 2010 3:50 PM

# discount ugg sienna miller boots 5818 sales online

Requesting Gravatar...
YS0226A9 Unwearied still, lover by lover,They paddle in the cld,Companionable ugg australia shoes streams or climb the air;Their hearts have not grown old;ugg coquette Passion or conquest, wander where they will, Attend upon them still ugg adirondack boots. But now they drift on the still water, Mysterious, beautiful; Among what http://www.uggboots4buy.com/ rushes will they build, By what lake’s edge or pool,Delight men’s mbt shoes eyes when I awake some day.To find they have flown uggs classic cardy away?Before there was no reason in the world As now there is I was the bough bent easy by a ugg boots bird I was the vague blue-grazing flock The sleeping and invisible!
Left by cheap women's ugg elsey boots on Feb 25, 2010 3:57 PM

# discount mens air jordan shoes 13 online sales

Requesting Gravatar...
YS0226A10 When you are old and gray and full of sleep,nd nodding by the moncler jackets fire, take down this book! And slowly read jordans sheoes , and dream of the soft look,Your eyes had once, and of their cheap nike shoes shadows deep;How many loved your moments of glad grace,And loved your beauty with nike air force 1 love false or true; But one man loved the pilgrim soul in you,And http://www.onestop-onlineshopping.com/ loved the sorrows of your changing face; And bending down beside the designer clothing glowing bars,Murmur, a little sadly, how love fled.And paced upon the mountains overhead discount air jordan shoes,And hid his face amid a crowd of stars.
Left by cheap nike air max 90 online on Feb 25, 2010 4:00 PM

# discount louis vuitton damier canvas handbags online sales

Requesting Gravatar...
YS0226A11 Surrounding you are angels,They are there to guide your pat.If designer purses weaesskn overcomes you,They'll give you strength if you will ask. They are your protection.When discount designer bags on sale life seems too hard to bear,And though you feel alone at es, The louis vuitton 2009 angels ... they are there.Their faces may be hidden And their voices you might not hear,But they are ALWAYS with you,Through your laughter or your tears.http://www.handbags4buy.com/ They'll walk along beside you,They'll guide your leather handbags steps along the way, They'll comfort you and hold you,Protect you dior handbags night and day.They'll hold to your hand tightly ,They'll not ever let it go,And they'll gently lead you cheap designer handbagsforward,Taking each step very slow.For even as you slumber,They watch closely over you;They are there beside you. In each and every thing you do.
Left by cheap nike air max 90 online on Feb 25, 2010 4:09 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...

wedding dresses,wedding gowns,bride dresses,bridesmaids dresses,evening dresses,bridal gowns,flower girl dresses
Wedding Gowns
Formal Gowns
Cocktail Gowns
Find the wedding dress designer and wedding dress that's right for you! Browse dresses from
Bridesmaid Gowns
Evening Gowns
View our selection of exquisite, handmade gowns and dresses for your wedding
Wedding Dresses, Wedding Shoes and Wedding Accessories from wedding shop, the UK's finest collection of designer wedding dresses.
Use the wedding dress and
cheap wedding
wedding dresses
wedding shop
bv
Left by sbb on Feb 27, 2010 10:11 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
Im not familiar with the concept Session object which is a Unit of Work (UoW) container.
Left by Van leasing deals on Mar 04, 2010 9:40 PM

# re: NHibernate and the Unit of Work Pattern

Left by haci on Mar 05, 2010 8:24 AM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
I admire the valuable information you offer in your articles.
Left by ucvhost on Mar 06, 2010 2:51 AM

# ugg boots

Requesting Gravatar...


they are very good and useful!!!
ugg outlet
cheap uggs
nike shoes
wholesale watches 2
Left by ugg boots on Mar 07, 2010 5:28 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
b34 It’s hard to find knowledgeable people on this topic, but you sound like you know what you’re talking about! Thanks Don’t stop writing, you’ve given me lots of good info! Youtube to MP4 Converter
Convert PDF to image
Left by powerpoint on Mar 08, 2010 2:23 PM

# re: NHibernate and the Unit of Work Pattern

Requesting Gravatar...
My hair is just over my ears. I like two kinds of hair styles most. Firstly, use the ghd straighteners to make

the hair in nature and bouffant style. Divide the hair into several portions. Use ghd pink to roll them inside

towards your ears. Several minutes later, the hair will roll neatly inside in the branches. Secondly, the active and energetic style with the roll of the

direction in the opposite direction can be made similarly with the formal procedure. All you need to do is to roll the hair outward instead of inward

with ghd mk5.
It is so simple that you can have your own charming short hair style with GHD straightener uk. Besides the new hair styles,ghd straighteners can help you with the puffy hair after you get up which is the annoying thing for many short hair

girls.
SoAll you need to do is to roll the hair outward instead of inward with GHD hair straightener. as long as I have the good tool of ghd pink, no matter what the fashion trend goes of hair styles, I will

stick into my favorite neat short hair.
Left by ghd straighteners on Mar 09, 2010 3:32 PM

Your comment:

 (will show your gravatar)
 
Please add 8 and 5 and type the answer here: