/// <summary>
        /// Process autofac configuration
        /// </summary>
        public static void Configure()
        {
            var builder = new ContainerBuilder();

            //builder.RegisterControllers(typeof(WCFService).Assembly);
            //builder.RegisterModelBinders(typeof(WCFService).Assembly);
            builder.RegisterModelBinderProvider();

            builder.RegisterModule <AutofacWebTypesModule>();

            builder.RegisterSource(new ViewRegistrationSource());
            builder.RegisterFilterProvider();

            builder.RegisterType <UserService>().As <IUserService>();
            builder.RegisterType <TODOListApplication.Business.Services.ToDoService>().As <TODOListApplication.Business.Services.Interfaces.IToDoService>();
            var container = IocRegistration.Boostrap(builder);

            DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
        }
예제 #2
0
 public BaseTestClass()
 {
     IocRegistration.Boostrap();
 }