예제 #1
0
        public static void RegisterTypes()
        {
            RegistrationBuilder rb = new RegistrationBuilder();

            RegisterDbContexts(rb);
            RegisterRepositories(rb);
            RegisterControllers(rb);
            RegisterFactories(rb);
            RegisterMappers(rb);

            ServiceLocatorConfig._container = new CompositionContainer(
                new AssemblyCatalog(
                    Assembly.GetExecutingAssembly(),
                    rb
                    )
                );

            var resolver = new MefDependencyResolver(ServiceLocatorConfig._container);

            DependencyResolver.SetResolver(resolver);
        }
예제 #2
0
        public static void RegisterTypes()
        {
            RegistrationBuilder rb = new RegistrationBuilder();

            RegisterDbContexts(rb);
            RegisterRepositories(rb);
            RegisterControllers(rb);
            RegisterFactories(rb);
            RegisterMappers(rb);

            ServiceLocatorConfig._container = new CompositionContainer(
                new AssemblyCatalog(
                    Assembly.GetExecutingAssembly(),
                    rb
                )
            );

            var resolver = new MefDependencyResolver(ServiceLocatorConfig._container);

            DependencyResolver.SetResolver(resolver);
        }