hn-dotnet/Application/CommentLink/CommentLinkCommand.cs

27 lines
509 B
C#

using System;
using System.ComponentModel.DataAnnotations;
using MediatR;
namespace HN.Application
{
public sealed class CommentLinkCommand : IRequest<Guid>
{
[Required]
public Guid LinkId { get; set; }
[Required]
public string Content { get; set; }
// Constructeur vide nécessaire pour le model binding
public CommentLinkCommand()
{
}
public CommentLinkCommand(Guid linkId, string content = null)
{
LinkId = linkId;
Content = content;
}
}
}