more extenson methods. :)
This commit is contained in:
parent
c4627fe42e
commit
a5661b69a8
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
@ -20,6 +20,7 @@
|
||||
<ProjectReference Include="..\PoweredSoft.CQRS.DynamicQuery.Abstractions\PoweredSoft.CQRS.DynamicQuery.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\PoweredSoft.CQRS.DynamicQuery.AspNetCore\PoweredSoft.CQRS.DynamicQuery.AspNetCore.csproj" />
|
||||
<ProjectReference Include="..\PoweredSoft.CQRS.DynamicQuery\PoweredSoft.CQRS.DynamicQuery.csproj" />
|
||||
<ProjectReference Include="..\PoweredSoft.CQRS.FluentValidation\PoweredSoft.CQRS.FluentValidation.csproj" />
|
||||
<ProjectReference Include="..\PoweredSoft.CQRS.GraphQL.FluentValidation\PoweredSoft.CQRS.GraphQL.FluentValidation.csproj" />
|
||||
<ProjectReference Include="..\PoweredSoft.CQRS.GraphQL.HotChocolate.DynamicQuery\PoweredSoft.CQRS.GraphQL.HotChocolate.DynamicQuery.csproj" />
|
||||
<ProjectReference Include="..\PoweredSoft.CQRS.GraphQL.HotChocolate\PoweredSoft.CQRS.GraphQL.HotChocolate.csproj" />
|
||||
|
@ -25,6 +25,7 @@ using PoweredSoft.CQRS.GraphQL.HotChocolate.DynamicQuery;
|
||||
using PoweredSoft.CQRS.Abstractions.Security;
|
||||
using Demo.Security;
|
||||
using Microsoft.AspNet.OData.Extensions;
|
||||
using PoweredSoft.CQRS.FluentValidation;
|
||||
|
||||
namespace Demo
|
||||
{
|
||||
@ -95,8 +96,12 @@ namespace Demo
|
||||
services.AddCommand<CreatePersonCommand, CreatePersonCommandHandler>();
|
||||
services.AddTransient<IValidator<CreatePersonCommand>, CreatePersonCommandValidator>();
|
||||
|
||||
/* OLD WAY STILL VALID
|
||||
services.AddCommand<EchoCommand, string, EchoCommandHandler>();
|
||||
services.AddTransient<IValidator<EchoCommand>, EchoCommandValidator>();
|
||||
services.AddTransient<IValidator<EchoCommand>, EchoCommandValidator>();*/
|
||||
|
||||
// new way :) with PoweredSoft.CQRS.FluentValidation package.
|
||||
services.AddCommandWithValidator<EchoCommand, string, EchoCommandHandler, EchoCommandValidator>();
|
||||
}
|
||||
|
||||
private void AddQueries(IServiceCollection services)
|
||||
|
Loading…
Reference in New Issue
Block a user