Update ReadEmailTemplateQuery to non-nullable return type

Refactored ReadEmailTemplateQuery and handler to use non-nullable EmailTemplateDto, throwing NotFoundException when no template is found. Updated namespaces and using statements for consistency. Added detailed XML docs for query properties. Controller updated to reference new query namespace.
This commit is contained in:
2026-02-09 10:49:05 +01:00
parent 6291712291
commit de36e29743
2 changed files with 30 additions and 9 deletions

View File

@@ -1,17 +1,15 @@
using AutoMapper;
using EnvelopeGenerator.Application.EmailTemplates;
using EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
using EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
using EnvelopeGenerator.Application.EmailTemplates.Commands;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using MediatR;
using System.Threading.Tasks;
using EnvelopeGenerator.Application.Common.Dto;
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.EmailTemplates.Commands;
using EnvelopeGenerator.Application.EmailTemplates.Queries;
namespace EnvelopeGenerator.API.Controllers;