protected override void Load(ContainerBuilder builder) { builder.RegisterGenerics(typeof(IQueryHandler<,>)); builder.RegisterGenerics(typeof(IAsyncQueryHandler<,>)); builder .RegisterType<QueryService>() .As<IQueryService>() .InstancePerLifetimeScope(); }
protected override void Load(ContainerBuilder builder) { builder .RegisterType<ValidatorFactory>() .As<FluentValidation.IValidatorFactory>(); builder .RegisterGenerics(typeof (FluentValidation.AbstractValidator<>)); builder .RegisterType<FluentValidationValidatorFactory>() .As<Core.Validation.IValidatorFactory>(); }
protected override void Load(ContainerBuilder builder) { builder .RegisterGenerics(typeof (IAsyncCommandHandler<>)); }