From ff7d6c99ae7a4cf91e1d6cec9a483875b44c3b7d Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 26 Mar 2026 15:48:06 +0100 Subject: [PATCH] Update RecActionViewDto mapping and add Profile property Refactored DtoMappingProfile to pass both the source object and its Profile to ReplacePlaceholders when mapping queries. Added a nullable Profile property to RecActionViewDto to include full profile details in the DTO. --- src/ReC.Application/Common/Dto/DtoMappingProfile.cs | 4 ++-- src/ReC.Application/Common/Dto/RecActionViewDto.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ReC.Application/Common/Dto/DtoMappingProfile.cs b/src/ReC.Application/Common/Dto/DtoMappingProfile.cs index 9e5b374..beec95f 100644 --- a/src/ReC.Application/Common/Dto/DtoMappingProfile.cs +++ b/src/ReC.Application/Common/Dto/DtoMappingProfile.cs @@ -9,9 +9,9 @@ public class DtoMappingProfile : AutoMapper.Profile { CreateMap() .ForMember(dest => dest.PreprocessingQuery, opt => opt.MapFrom((src, _) => - src.PreprocessingQuery?.ReplacePlaceholders(src))) + src.PreprocessingQuery?.ReplacePlaceholders(src, src.Profile))) .ForMember(dest => dest.PostprocessingQuery, opt => opt.MapFrom((src, _) => - src.PostprocessingQuery?.ReplacePlaceholders(src))); + src.PostprocessingQuery?.ReplacePlaceholders(src, src.Profile))); CreateMap(); CreateMap(); diff --git a/src/ReC.Application/Common/Dto/RecActionViewDto.cs b/src/ReC.Application/Common/Dto/RecActionViewDto.cs index 60399a0..aef2d9e 100644 --- a/src/ReC.Application/Common/Dto/RecActionViewDto.cs +++ b/src/ReC.Application/Common/Dto/RecActionViewDto.cs @@ -8,6 +8,8 @@ public record RecActionViewDto public long? ProfileId { get; init; } + public ProfileViewDto? Profile { get; init; } + public string? ProfileName { get; init; } public ProfileType? ProfileType { get; init; }