using ReC.Application.Common.Dto; using ReC.Application.RecActions.Commands; namespace ReC.Application.RecActionViews; // 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.AddedWhen, exp => exp.MapFrom(cmd => DateTime.UtcNow)) .ForMember(e => e.AddedWho, exp => exp.MapFrom(cmd => "ReC.API")); } }