netmash/NDB.Application.DataContracts/Command.cs

25 lines
477 B
C#

using MediatR;
using System;
namespace Netmash.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;
}
}
}