I am currently working on a solution in visual studio which I am going to deploy on windows azure. The solution consists of a MVC3 web role where data from SQL Server is represented. I've already set up Ninject and Fluent NHibernate to decouple the views from the database and the concrete implementations.
What I'd like to do now, is to put all the data access logic (i.e. NHibernate along with the repositories for data access) into a separate c# project so that I can reuse this project for the MVC3 project AND a future SOA project.
Any ideas how I may achieve this? I figured out how to do it with "code-only" classes, but a handful issues come up when using hibernate. I guess it's related to the ISession object in the global.asx which is created for each web request.
Any hints to simple implementations, scenarios or how-to's would be very helpful. If needed I can post code as well - just let me know which parts in detail ;-)
Regards, Martin