Hving dependencies in entities is a worst practice. Stop right now and go read 
some more on domain entities and the dependency inversion principle. Like right 
now. Run.


On 11 Jan 2013, at 18:55, Mike 
<[email protected]<mailto:[email protected]>> wrote:

Based on some research I've done (Dependency Injection in 
.NET<http://www.amazon.com/Dependency-Injection-NET-Mark-Seemann/dp/1935182501> 
and through coding experience) Constructor Injection is often the best way for 
an object to receive dependencies. My questions are:

  1.  Are others who use NHibernate using Constructor Injection in mapped 
entities?
  2.  What is the current best practice for integrating a container such as 
Castle Windsor with NHibernate to enable Constructor Injection for mapped 
entities?
  3.  From what I have seen, creating a custom IBytecodeProvider would work to 
enable NHibernate to use an external container. Is there an official source for 
a Castle Windsor IBytecodeProvider that will work with the latest version of 
NHibernate?

Thanks for your help

--
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/aPKySRgCGIMJ.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
To unsubscribe from this group, send email to 
[email protected]<mailto:[email protected]>.
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

-- 
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.

Reply via email to