- Updated `CreateEnvelopeReceiverCommand` to specify response type for `IRequest`. - Enhanced `CreateEnvelopeReceiverCommandHandler` to use `AutoMapper` and return `CreateEnvelopeReceiverResponse`. - Modified `Handle` method to map envelope data and populate recipient lists. - Changed `CreateEnvelopeReceiverResponse` to inherit from `CreateEnvelopeResponse` and added new properties. - Adjusted mapping profile to map `Envelope` to `CreateEnvelopeReceiverResponse`. - Created new mapping profile for `Receiver` to `ReceiverReadDto`.
22 lines
555 B
C#
22 lines
555 B
C#
using AutoMapper;
|
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
|
using EnvelopeGenerator.Application.Envelopes.Commands;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
|
|
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class CreateEnvelopeReceiverMappingProfile : Profile
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public CreateEnvelopeReceiverMappingProfile()
|
|
{
|
|
CreateMap<Envelope, CreateEnvelopeResponse>();
|
|
CreateMap<Receiver, ReceiverReadDto>();
|
|
}
|
|
}
|