- Updated EmailTemplateDto to allow mutable Body and Subject properties. - Implemented IRequest interface in UpdateEmailTemplateCommand for MediatR. - Enhanced error handling in EmailTemplateController with NotFoundException. - Introduced UpdateEmailTemplateCommandHandler for processing update commands. - Added NotFoundException class for improved error handling.
32 lines
699 B
C#
32 lines
699 B
C#
using DigitalData.Core.Abstractions;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace EnvelopeGenerator.Application.DTOs
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[ApiExplorerSettings(IgnoreApi = true)]
|
|
public record EmailTemplateDto : IUnique<int>
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int Id{ get; init; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public required string Name { get; init; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public required string Body { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public required string Subject { get; set; }
|
|
};
|
|
} |