25 lines
473 B
C#
25 lines
473 B
C#
|
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;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|