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.
This commit is contained in:
@@ -9,9 +9,9 @@ public class DtoMappingProfile : AutoMapper.Profile
|
||||
{
|
||||
CreateMap<RecActionView, RecActionViewDto>()
|
||||
.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<ResultView, ResultViewDto>();
|
||||
CreateMap<ProfileView, ProfileViewDto>();
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user