Update README.md
This commit is contained in:
parent
1eb484ce88
commit
54da3d42e5
16
README.md
16
README.md
@ -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>();
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user