Question NHibernate with MongoDB


New member
Sep 18, 2012
Programming Experience

I am trying to work on implementing Nhibernate with MongoDb in c# but not getting any clue. Please refere some good links where i can read about it or give some good starting point.

I already have spent many hours on googling but in vain
Why nhibernate? It's an ORM designed to bridge the gap between the relational model and object model. I would think you'd be better off concentrating on implementing the patterns that make nhibernate work well, unit of work, repository, session. Martin Fowler's POEAA book is a great read for this. Other issues you will need to solve are atomicity and consistency of your transactions, have a look at two phase commit. Also managing relationships between entities and cascades etc but I would be wary of taking it thatfar, you might be using the wrong database at that point.

Have you considered using a document to store an aggregate of entities? That really reduces the need for much of what I mentioned above.
Top Bottom