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.
|
If you install. ```PoweredSoft.CQRS.FluentValidation``` you can use this way of registrating your commands.
|
||||||
|
|
||||||
```chsarp
|
```chsarp
|
||||||
// without Package.
|
public void ConfigureServices(IServiceCollection services)
|
||||||
services.AddCommand<EchoCommand, string, EchoCommandHandler>();
|
{
|
||||||
services.AddTransient<IValidator<EchoCommand>, EchoCommandValidator>();*/
|
// without Package.
|
||||||
|
services.AddCommand<EchoCommand, string, EchoCommandHandler>();
|
||||||
|
services.AddTransient<IValidator<EchoCommand>, EchoCommandValidator>();
|
||||||
|
}
|
||||||
|
|
||||||
// with PoweredSoft.CQRS.FluentValidation package.
|
public void ConfigureServices(IServiceCollection services)
|
||||||
services.AddCommandWithValidator<EchoCommand, string, EchoCommandHandler, EchoCommandValidator>();
|
{
|
||||||
|
// with PoweredSoft.CQRS.FluentValidation package.
|
||||||
|
services.AddCommandWithValidator<EchoCommand, string, EchoCommandHandler, EchoCommandValidator>();
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user