Integration with NHibernate

125 views
Skip to first unread message

Chadly

unread,
May 29, 2009, 10:15:12 AM5/29/09
to Autofac
I created a project which integrates Autofac with NHibernate's latest
support for dependency containers. I wrote about it here:

http://chadly.net/post/2009/05/28/Dependency-Injection-with-NHibernate-and-Autofac.aspx

I would like to include this in Autofac's repository
(Autofac.Contrib?). Let me know if this is something that people
would be interested in including.

Chadly

unread,
May 29, 2009, 12:43:30 PM5/29/09
to Autofac
sorry for the double post - the group seems to be very slow in
receiving new messages.. ?

On May 29, 9:15 am, Chadly <chadl...@gmail.com> wrote:
> I created a project which integrates Autofac with NHibernate's latest
> support for dependency containers.  I wrote about it here:
>
> http://chadly.net/post/2009/05/28/Dependency-Injection-with-NHibernat...

Nicholas Blumhardt

unread,
May 29, 2009, 10:25:35 PM5/29/09
to aut...@googlegroups.com
Sorry about that. Unless you join the group your messages are moderated, and I'm a bit slow to get to them sometimes :)

2009/5/29 Chadly <chad...@gmail.com>

Travis Illig

unread,
Oct 17, 2014, 6:52:32 PM10/17/14
to aut...@googlegroups.com
I'm working on getting the Autofac doc site up to date and while I see the code in the Autofac.Extras.NHibernate package... I'm not an NHibernate guy and there are no unit tests, docs, or examples with it.

The blog article provided talks briefly about the AutofacBytecodeProvider and how you set it...
  • Is this still how you set it today, five years later?
  • The AutofacBytecodeProvider takes three parameters - the container (component context), a proxy factory, and a collection type factory. The example in the blog entry only passes two parameters in to the constructor. What's the third one?
  • Does anyone have any examples of this working "in the wild" that I could anonymize and use in the docs?
  • Anyone run into any gotchas that should be documented?
Any help here would be greatly appreciated. Thanks!

-T

Eizo Nishime

unread,
Oct 22, 2014, 12:41:24 AM10/22/14
to aut...@googlegroups.com
Hi, Travis.

I've tried to use Autofac.Extras.NHibernate package, but I couldn't get it working. I had the same problems that you mentioned.

So, I've ended using  NHibernate.DependencyInjection.

I posted a question in StackOverflow sometime ago. 

The use of the NHibernate.DependencyInjection with Autofac is similar to Chad's code in Autofac.Extras.NHibernate package.
Reply all
Reply to author
Forward
0 new messages