Ejemplo n.º 1
0
        public static void RegisterComponents()
        {
            UnityContainerFactory unityFactory = new UnityContainerFactory();
            var container = unityFactory.GetInstance();

            // register all your components with the container here
            // it is NOT necessary to register your controllers

            // e.g. container.RegisterType<ITestService, TestService>();

            GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container);
        }