From 73ccb9e43bb726458f5b25f24a9bdec4eaf7fec4 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 17 Dec 2025 10:26:29 +0100 Subject: [PATCH] Add AutoMapper profile for CreateResultViewCommand mapping Introduced a MappingProfile in ReC.Application.ResultViews to map CreateResultViewCommand to ResultView, setting AddedWhen to DateTime.UtcNow during mapping. Included necessary using directives. --- src/ReC.Application/ResultViews/MappingProfile.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/ReC.Application/ResultViews/MappingProfile.cs diff --git a/src/ReC.Application/ResultViews/MappingProfile.cs b/src/ReC.Application/ResultViews/MappingProfile.cs new file mode 100644 index 0000000..206476d --- /dev/null +++ b/src/ReC.Application/ResultViews/MappingProfile.cs @@ -0,0 +1,13 @@ +using ReC.Application.ResultViews.Commands; +using ReC.Domain.Entities; + +namespace ReC.Application.ResultViews; + +public class MappingProfile : AutoMapper.Profile +{ + public MappingProfile() + { + CreateMap() + .ForMember(e => e.AddedWhen, exp => exp.MapFrom(cmd => DateTime.UtcNow)); + } +} \ No newline at end of file