netmash/NDB.Application.DataContracts/Command.cs

25 lines
473 B
C#
Raw Normal View History

2020-12-20 21:05:04 +02:00
using MediatR;
using System;
namespace NDB.Application.DataContracts
{
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;
}
}
}