feat(MappingProfile): add AutoMapper profile for CreateAnnotationCommand to Annotation
This commit is contained in:
parent
7919f02ffd
commit
26bdb0806d
20
EnvelopeGenerator.Application/Annotations/MappingProfile.cs
Normal file
20
EnvelopeGenerator.Application/Annotations/MappingProfile.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using AutoMapper;
|
||||
using EnvelopeGenerator.Application.Annotations.Commands;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Annotations;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MappingProfile : Profile
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public MappingProfile()
|
||||
{
|
||||
CreateMap<CreateAnnotationCommand, Annotation>()
|
||||
.ForMember(dest => dest.AddedWhen, opt => opt.MapFrom(_ => DateTime.UtcNow));
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,6 @@
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
using Newtonsoft.Json;
|
||||
using System.Dynamic;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user