public static IContainer UseFluentMessageValidator(this IContainer container) { var controller = new ValidationController(new StructureMapServiceProvider(container)); controller.RegisterFromAssemblies(typeof(CreateTodoListValidator).Assembly); container.Configure(expression => expression.For <ValidationController>().Use(controller).Singleton()); return(container); }