i think you should not inject daos into yout business entities, i like the concept about single responsability, so, if your biz entities define your business domain you are adding an extra responsability, to access repositories, so, i would define extra classes to manage business interactions, for example, Customer is your POCO and then we will have the CustomerComponent class which does business logic related to customers, for example FindAll(), DeleteCustomer(), send email about a new product to a customer (SendEmailForNewProduct()), components are defined into the architecture proposed by microsoft for .net applications, and of course you need to innject daos or repositories into your components to be able to access to a repository of data
On Aug 28, 11:09 pm, Brendan Erwin <[email protected]> wrote: > I'm thinking of wiring up StructureMap to provide IoC within NH so I > can inject my DAOs into my domain models. > > In doing the research I see a lot of people speaking out against > having dependencies in ones domain, but the way I see it my data > access strategies and policies are part of my domain. How wrong am I? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
