diff --git a/src/ReC.Application/Common/Behaviors/BodyQueryBehavior.cs b/src/ReC.Application/Common/Behaviors/BodyQueryBehavior.cs index a124b6c..f79c145 100644 --- a/src/ReC.Application/Common/Behaviors/BodyQueryBehavior.cs +++ b/src/ReC.Application/Common/Behaviors/BodyQueryBehavior.cs @@ -5,11 +5,12 @@ using Microsoft.EntityFrameworkCore; namespace ReC.Application.Common.Behaviors; -public class BodyQueryBehavior(IRecDbContext dbContext) : IPipelineBehavior - where TRecAction : RecActionDto +public class BodyQueryBehavior(IRecDbContext dbContext) : IPipelineBehavior + where TRequest : RecActionDto + where TResponse : notnull { - public async Task Handle(TRecAction action, RequestHandlerDelegate next, CancellationToken cancel) - { + public async Task Handle(TRequest action, RequestHandlerDelegate next, CancellationToken cancel) + { if (action.BodyQuery is null) return await next(cancel);