Castle/Spring are 2 good ways of implementing IoC, but they are not
necessarily the only way.Using well known patterns you can easily implement
your own IoC for NHibernate.

I'm working on 3 projects that all use NH and the only tests that actually
require the database are the functional/acceptance tests (FIT)  and the NH
mapping/Finder tests.

Using mocking and the Factory pattern, I'm able to run all other automated
unit tests to exercise the system without a database.  This makes your unit
tests run soooo much faster which means you are more likely to run them more
often..

Martin Fowler's Enterprise Patterns is a good book to look at how to design
systems that allow you to easily inject your mocks into the *System Under
Test* for IoC...

Greg

On Thu, Aug 6, 2009 at 10:48 AM, Guga Oliveira <[email protected]>wrote:

>
> Here we have developed 2 projects using Spring.Net as IoC for
> NHibernate. But we are in doubt about the efficience. Some friends
> tells that they preffers without IoC.
>
> What is the opinion of the mastere? Use or not? If it will be beter to
> use somo IoC. What is most indicated, Castle or Spring?
>
> Thanks a lot.
> >
>

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