diff --git a/src/ReC.Application/Endpoints/MappingProfile.cs b/src/ReC.Application/Endpoints/MappingProfile.cs index 4e9d02e..8bfbd0f 100644 --- a/src/ReC.Application/Endpoints/MappingProfile.cs +++ b/src/ReC.Application/Endpoints/MappingProfile.cs @@ -3,11 +3,14 @@ using ReC.Domain.Entities; namespace ReC.Application.Endpoints; +// TODO: update to inject AddedWho from the current host/user contex public class MappingProfile : AutoMapper.Profile { public MappingProfile() { CreateMap() - .ForMember(e => e.Active, exp => exp.MapFrom(cmd => true)); + .ForMember(e => e.Active, exp => exp.MapFrom(cmd => true)) + .ForMember(e => e.AddedWhen, exp => exp.MapFrom(cmd => DateTime.UtcNow)) + .ForMember(e => e.AddedWho, exp => exp.MapFrom(cmd => "ReC.API")); } }