netmash/Netmash.Application.DataCon.../Command.cs

25 lines
477 B
C#
Raw Normal View History

2020-12-20 21:05:04 +02:00
using MediatR;
using System;
2023-01-12 01:01:36 +02:00
namespace Netmash.Application.DataContracts
2020-12-20 21:05:04 +02:00
{
public interface ICommand
{
}
public abstract class Command<TResponse> : ICommand, IRequest<TResponse>
{
public Metadata Metadata { get; }
protected Command()
{
Metadata = new Metadata() { CorrelationId = Guid.NewGuid() };
}
protected Command(Metadata metadata)
{
Metadata = metadata;
}
}
}