Autofac implementation of the NHibernate factories that allow for dependency injection into entities and NHibernate objects.
⚠️ PROJECT ARCHIVED: This package was put into maintenance-only mode in 2015 and was subsequently archived with no intent to continue any level of support in 2026.
Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.
The provider is based on the blog article here.
var builder = new ContainerBuilder();
var container = builder.Build();
Environment.BytecodeProvider = new AutofacBytecodeProvider(
container,
new ProxyFactoryFactory());