Files
ReC/src/ReC.Application/Common/Dto/DtoMappingProfile.cs
TekH 77baf395ce Update ReplacePlaceholders mapping to use single argument
Removed src.Profile from ReplacePlaceholders calls in DtoMappingProfile for PreprocessingQuery and PostprocessingQuery mappings, now passing only src as the argument. This simplifies the mapping logic and aligns with the updated method signature.
2026-03-30 14:32:31 +02:00

19 lines
626 B
C#

using ReC.Domain.Views;
namespace ReC.Application.Common.Dto;
public class DtoMappingProfile : AutoMapper.Profile
{
public DtoMappingProfile()
{
CreateMap<RecActionView, RecActionViewDto>()
.ForMember(dest => dest.PreprocessingQuery, opt => opt.MapFrom((src, _) =>
src.PreprocessingQuery?.ReplacePlaceholders(src)))
.ForMember(dest => dest.PostprocessingQuery, opt => opt.MapFrom((src, _) =>
src.PostprocessingQuery?.ReplacePlaceholders(src)));
CreateMap<ResultView, ResultViewDto>();
CreateMap<ProfileView, ProfileViewDto>();
}
}