I'm trying to implement what is said in this post:
http://www.jeremyskinner.co.uk/2010/02/22/using-fluentvalidation-with-an-ioc-container/
but do not know how to adapt to a desktop application, in special this section:
thank you for your help you
http://www.jeremyskinner.co.uk/2010/02/22/using-fluentvalidation-with-an-ioc-container/
but do not know how to adapt to a desktop application, in special this section:
protected void Application_Start() {
RegisterRoutes(RouteTable.Routes);
//Configure structuremap
ObjectFactory.Configure(cfg => cfg.AddRegistry(new MyRegistry()));
ControllerBuilder.Current.SetControllerFactory(new StructureMapControllerFactory());
//Configure FV to use StructureMap
var factory = new StructureMapValidatorFactory();
//Tell MVC to use FV for validation
ModelValidatorProviders.Providers.Add(new FluentValidationModelValidatorProvider(factory));
DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false;
}
I'm using Domain Driven Design architecture.thank you for your help you