Commit 4c0a6b16 authored by Almouhannad's avatar Almouhannad

(B) Add CQRS bases

parent 4382139b
using MediatR;
namespace Application.Abstractions.CQRS.Commands;
// No response
public interface ICommand : IRequest
{
}
// With response
public interface ICommand<TResponse> : IRequest<TResponse>
{
}
using MediatR;
namespace Application.Abstractions.CQRS.Commands;
// No response
public interface ICommandHandler<TCommand> : IRequestHandler<TCommand>
where TCommand : ICommand
{
}
// With response
public interface ICommandHandler<TCommand, TResponse>
: IRequestHandler<TCommand, TResponse>
where TCommand : ICommand<TResponse>
{
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Application.Abstractions.CQRS.Queries
{
internal interface Interface1
{
}
}
using MediatR;
namespace Application.Abstractions.CQRS.Queries;
public interface IQueryHandler<TQuery, TResponse>
: IRequestHandler<TQuery, TResponse>
where TQuery : IQuery<TResponse>
{
}
......@@ -6,6 +6,10 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MediatR" Version="12.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
</ItemGroup>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment