2009/7/8 Dotan N. <[email protected]>: > why would repository know there is a concept of a session - maybe only the > repository should know, and if someone wants to impl. a new one, he has the > interface.
With this I agree - my nhibernate-specific implementations of my repository interfaces always deal with the ISession. Either some sort of contextual session (GetCurrentSession()) or by injecting a session when the repository is instantiated. > so on the contrary - why should the *application* know that there > is a concept of a session? My application knows about its various use cases and UnitOfWorks - an individual repository does not. In this case I take application to mean that which takes your various parts (e.g. persistance, domain model, business rules, infrastructure) and actually causes the parts to move together to actually do something useful. It could be the Application class in ASP.Net. For example it could be a web service interface or some other service style interface, where each method correspond to a UnitOfWork. /Oskar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
