using HrynCo.NotificationService.DAL.Abstract.Repositories; using HrynCo.NotificationService.Services.Core; using HrynCo.NotificationService.Services.Logging; using static HrynCo.NotificationService.Services.Core.ServiceResultHelper; namespace HrynCo.NotificationService.Services.TemplateDefinitions; internal sealed class GetAllNotificationServicesHandler( IContextualSerilogLogger logger, INotificationServiceRepository services) : RequestHandler>>(logger) { protected override async Task>> DoOnHandle(GetAllNotificationServicesQuery request, CancellationToken cancellationToken) { var all = await services.GetAllAsync(cancellationToken); return Success>(all.Select(NotificationServiceMapping.Map).ToList()); } }