Hi everettmuniz - I usually build my applications so that they know the domain class. I would normally never replace my domain class with an interface.
For retrieving the instances I use the Dao pattern, with interfaces mind you. I have been heavily inspired by Billy MacCafferty's article on Code Project: http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx I think that it makes perfect sense to have the repository/dao implementation know the type of class they are returning. Forcing them to work on interfaces instead seems to me to be a waste of energy. Cheers, Thomas On 1 Maj, 00:51, everettmuniz <[email protected]> wrote: > For those of you using NHibernate in DDD projects do you structure > your factory and repository methods to return/accept interfaces or > their implementations? I've written the domain model and service > layer in my current project to rely heavily on interfaces rather than > implementations but given that NHibernate maps to classes and not > interfaces it seems like it may make more sense to structure the > factories / repositories to at least work with classes rather than the > interfaces they're based on. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
