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.
24 lines
665 B
C#
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();
|
|
}
|
|
} |