I recently posted a question which was answered by Bryan Watts, regarding generic repository for nHibernate.
I'm trying to design my data access to allow various facets - from ASP.net, WCF and Windows Forms / Windows services. I'm a bit confused re: session management etc..
How would I handle this?
I've been checking out code such as: http://membranecms.googlecode.com/svn/
and questions such as: http://stackoverflow.com/questions/1207833/nhibernate-linq-session-management
But what do i do if i don't just do things in a web based environment..?
Do i need to create different repositories for each client? Or do i pass in the ISession into the (for example) UserRepository constructor..?
... as a side note I'm using nHibernate.Linq Also using fluent nHibernate to config my mapping