示例#1
0
        private static IUnityContainer BuildUnityContainer()
        {
            var container = new UnityContainer();

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

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

            ServiceLayerBootstrapper.RegisterTypes(container);

            container.RegisterType <HomeController>();
            container.RegisterType <DataApiController>();
            return(container);
        }
        private static IUnityContainer BuildUnityContainer()
        {
            var container = new UnityContainer();

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

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

            ServiceLayerBootstrapper.RegisterTypes(container);

            container.RegisterType <HomeController>();
            container.RegisterType <ProjectDataController>();
            container.RegisterType <ProfileDataController>();
            container.RegisterType <RefereeDataController>();
            container.RegisterType <SkillSumDataController>();
            container.RegisterType <EducationDataController>();
            container.RegisterType <WorkExpDataController>();

            return(container);
        }