コード例 #1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
            container = new WindsorContainer();
            container.Register(new ContainerRegistration());

            DataAnnotationsModelValidatorProvider
                .AddImplicitRequiredAttributeForValueTypes = false;

            var factory = new WindsorValidatorFactory(container);

            var fvProvider
                = new FluentValidationModelValidatorProvider(factory);

            ModelValidatorProviders
                .Providers.Add(fvProvider);
        }
コード例 #2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
            container = new WindsorContainer();
            container.Register(new ContainerRegistration());

            DataAnnotationsModelValidatorProvider
            .AddImplicitRequiredAttributeForValueTypes = false;

            var factory = new WindsorValidatorFactory(container);

            var fvProvider
                = new FluentValidationModelValidatorProvider(factory);

            ModelValidatorProviders
            .Providers.Add(fvProvider);
        }