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.
This commit is contained in:
2025-12-17 10:26:29 +01:00
parent b6ab59ae4a
commit 73ccb9e43b

View File

@@ -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<CreateResultViewCommand, ResultView>()
.ForMember(e => e.AddedWhen, exp => exp.MapFrom(cmd => DateTime.UtcNow));
}
}