From a5661b69a812cc4d7d087f2b7010de567690628e Mon Sep 17 00:00:00 2001 From: David Lebee Date: Wed, 11 Aug 2021 17:00:22 -0400 Subject: [PATCH] more extenson methods. :) --- Demo/Demo.csproj | 3 ++- Demo/Startup.cs | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Demo/Demo.csproj b/Demo/Demo.csproj index d1235b0..1d9a7a7 100644 --- a/Demo/Demo.csproj +++ b/Demo/Demo.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -20,6 +20,7 @@ + diff --git a/Demo/Startup.cs b/Demo/Startup.cs index b5d83bd..42a61bc 100644 --- a/Demo/Startup.cs +++ b/Demo/Startup.cs @@ -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(); services.AddTransient, CreatePersonCommandValidator>(); + /* OLD WAY STILL VALID services.AddCommand(); - services.AddTransient, EchoCommandValidator>(); + services.AddTransient, EchoCommandValidator>();*/ + + // new way :) with PoweredSoft.CQRS.FluentValidation package. + services.AddCommandWithValidator(); } private void AddQueries(IServiceCollection services)