16 lines
450 B
C#
16 lines
450 B
C#
using MediatR;
|
|
|
|
namespace Knot.Contracts.Admin.Abstractions;
|
|
|
|
public interface ICommand : IRequest<Result> { }
|
|
|
|
public interface ICommand<TResponse> : IRequest<Result<TResponse>> { }
|
|
|
|
public interface ICommandHandler<in TCommand> : IRequestHandler<TCommand, Result>
|
|
where TCommand : ICommand
|
|
{ }
|
|
|
|
public interface ICommandHandler<in TCommand, TResponse> : IRequestHandler<TCommand, Result<TResponse>>
|
|
where TCommand : ICommand<TResponse>
|
|
{ }
|