This commit is contained in:
john 2025-05-14 23:53:00 +02:00
parent baea64229b
commit 0dc41337da
36 changed files with 324 additions and 95 deletions

View file

@ -4,4 +4,8 @@ namespace Femto.Common.Domain;
public interface ICommand : IRequest;
public interface ICommand<out T> : IRequest<T>;
public interface ICommand<out TResult> : IRequest<TResult>;
public interface ICommandHandler<in TCommand> : IRequestHandler<TCommand> where TCommand : ICommand;
public interface ICommandHandler<in TCommand, TResult> : IRequestHandler<TCommand, TResult> where TCommand : ICommand<TResult>;

View file

@ -2,4 +2,6 @@ using MediatR;
namespace Femto.Common.Domain;
public interface IQuery<out T> : IRequest<T>;
public interface IQuery<out TResult> : IRequest<TResult>;
public interface IQueryHandler<in TQuery, TResult> : IRequestHandler<TQuery, TResult> where TQuery : IQuery<TResult>;