Add MapAddedWhen to History mapping in MappingProfile

Imported necessary namespaces and updated the CreateHistoryCommand-to-History mapping to include the MapAddedWhen extension method, likely to handle automatic setting of creation timestamps or similar metadata.
This commit is contained in:
2026-02-27 11:34:17 +01:00
parent 48f4ea0c50
commit afa3694cd7

View File

@@ -1,4 +1,5 @@
using AutoMapper;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Histories.Commands;
using EnvelopeGenerator.Domain.Entities;
@@ -17,6 +18,7 @@ public class MappingProfile: Profile
CreateMap<CreateHistoryCommand, History>()
.ForMember(dest => dest.Envelope, opt => opt.Ignore())
.ForMember(dest => dest.Sender, opt => opt.Ignore())
.ForMember(dest => dest.Receiver, opt => opt.Ignore());
.ForMember(dest => dest.Receiver, opt => opt.Ignore())
.MapAddedWhen();
}
}