0

I would like to use autofac and the Repository Pattern (iRepository) but can't seem to see a way to configure autofac using XML configuration.

As anyone else come across this issue?

Vince
  • 165
  • 1
  • 14
  • I can make it work using the example in the open generic http://code.google.com/p/autofac/wiki/OpenGenerics and using the builder, I was wondering if it was also possible to enable xml configuration with open generics, the team would like to be able to have that requirement. If it's not possible we will just create Interface for each Context / Type and move on. – Vince Dec 04 '12 at 19:45

1 Answers1

0

Autofac does not currently have support for registering open generics via XML configuration. The XML configuration mechanism is handy, but is not a complete 1:1 featureset of Autofac (and it probably never will be).

The recommended way to handle more complex configuration is to use XML configuration in combination with Autofac modules.

Travis Illig
  • 23,195
  • 2
  • 62
  • 85