diff --git a/src/ReC.Application/OutResults/MappingProfiles.cs b/src/ReC.Application/OutResults/MappingProfiles.cs index d3e6372..26f01dc 100644 --- a/src/ReC.Application/OutResults/MappingProfiles.cs +++ b/src/ReC.Application/OutResults/MappingProfiles.cs @@ -1,13 +1,15 @@ -using AutoMapper; -using ReC.Application.OutResults.Commands; +using ReC.Application.OutResults.Commands; using ReC.Domain.Entities; namespace ReC.Application.OutResults; +// TODO: update to inject AddedWho from the current host/user contex public class MappingProfiles : AutoMapper.Profile { public MappingProfiles() { - CreateMap(); + CreateMap() + .ForMember(e => e.AddedWhen, exp => exp.MapFrom(cmd => DateTime.UtcNow)) + .ForMember(e => e.AddedWho, exp => exp.MapFrom(cmd => "ReC.API")); } } \ No newline at end of file