Using a Generic Repository pattern with fluent nHibernate

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-04-06T20:15:34Z Indexed on 2010/04/06 20:23 UTC
Read the original article Hit count: 626

I'm currently developing a medium sized application, which will access 2 or more SQL databases, on different sites etc...

I am considering using something similar to this: http://mikehadlow.blogspot.com/2008/03/using-irepository-pattern-with-linq-to.html

However, I want to use fluent nHibernate, in place of Linq-to-SQL (and of course nHibernate.Linq)

Is this viable?

How would I go about configuring this? Where would my mapping definitions go etc...?

This application will eventually have many facets - from a WebUI, WCF Library and Windows applications / services.

Also, for example on a "product" table, would I create a "ProductManager" class, that has methods like:

GetProduct, GetAllProducts etc...

Any pointers are greatly received.

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about fluent-nhibernate