public static void RegisterComponents() { var container = new UnityContainer(); // register all your components with the container here // it is NOT necessary to register your controllers container.RegisterType <IFactory, Factory>(); container.AddRepositoryRegistry(); container.AddDomainRegistry(); // e.g. container.RegisterType<ITestService, TestService>(); GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container); }