Update README.md

This commit is contained in:
dlebee 2021-08-11 17:15:16 -04:00 committed by GitHub
parent 1eb484ce88
commit 54da3d42e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,10 +71,16 @@ We use fluent validation in all of our projects, but we don't want it to be enfo
If you install. ```PoweredSoft.CQRS.FluentValidation``` you can use this way of registrating your commands.
```chsarp
// without Package.
services.AddCommand<EchoCommand, string, EchoCommandHandler>();
services.AddTransient<IValidator<EchoCommand>, EchoCommandValidator>();*/
public void ConfigureServices(IServiceCollection services)
{
// without Package.
services.AddCommand<EchoCommand, string, EchoCommandHandler>();
services.AddTransient<IValidator<EchoCommand>, EchoCommandValidator>();
}
// with PoweredSoft.CQRS.FluentValidation package.
services.AddCommandWithValidator<EchoCommand, string, EchoCommandHandler, EchoCommandValidator>();
public void ConfigureServices(IServiceCollection services)
{
// with PoweredSoft.CQRS.FluentValidation package.
services.AddCommandWithValidator<EchoCommand, string, EchoCommandHandler, EchoCommandValidator>();
}
```