Files
EnvelopeGenerator/EnvelopeGenerator.Application/Histories/MappingProfile.cs
TekH afa3694cd7 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.
2026-02-27 11:34:17 +01:00

24 lines
665 B
C#

using AutoMapper;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Histories.Commands;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Histories;
/// <summary>
///
/// </summary>
public class MappingProfile: Profile
{
/// <summary>
///
/// </summary>
public MappingProfile()
{
CreateMap<CreateHistoryCommand, History>()
.ForMember(dest => dest.Envelope, opt => opt.Ignore())
.ForMember(dest => dest.Sender, opt => opt.Ignore())
.ForMember(dest => dest.Receiver, opt => opt.Ignore())
.MapAddedWhen();
}
}