- Updated `ReadEmailTemplateQuery` to implement `IRequest<ReadEmailTemplateResponse?>`. - Changed `ReadEmailTemplateResponse` from a record to a class with updated properties. - Enhanced `EmailTemplateController` to inject `IEmailTemplateRepository` and `IMediator`, and made the `Get` method asynchronous. - Introduced `ReadEmailTemplateMappingProfile` for AutoMapper mappings. - Added `ReadEmailTemplateQueryHandler` to manage query logic and response mapping. These changes improve the structure and maintainability of the email template querying process.
24 lines
508 B
C#
24 lines
508 B
C#
using AutoMapper;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class ReadEmailTemplateMappingProfile : Profile
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public ReadEmailTemplateMappingProfile()
|
|
{
|
|
CreateMap<EmailTemplate, ReadEmailTemplateResponse>();
|
|
}
|
|
}
|