Search code examples
dependency-injectionunity-containerioc-containerauto-registration

Registration with Unity


I'm accustomed to using Autofac and with autofac with one line of code I can register all the interfaces in the assembly so that they resolve to whatever classes implement that interface.

In Unity it's looking like I need to register every interface manually. I'm wondering if there is a simpler way to globally register everything, then for lifecycle differences create individual entries.

thanks


Solution

  • Unity 3 now supports auto-registration.