Add recent receiver suggestions query and DTO
Introduce `RecentReceiverSuggestionDto` to represent recent receiver suggestions with `FullName` and `EmailAddress`. Add `ReadRecentReceiverSuggestionsQuery` to retrieve recent receiver suggestions scoped by sender username and limited to 3-5 results. Implement `ReadRecentReceiverSuggestionsQueryHandler` to process the query using Entity Framework Core and AutoMapper. Update `MappingProfile` to map `EnvelopeReceiver` to `RecentReceiverSuggestionDto`.
This commit is contained in:
@@ -16,5 +16,9 @@ public class MappingProfile : Profile
|
||||
public MappingProfile()
|
||||
{
|
||||
CreateMap<Receiver, ReceiverDto>();
|
||||
|
||||
CreateMap<EnvelopeReceiver, RecentReceiverSuggestionDto>()
|
||||
.ForMember(dest => dest.FullName, opt => opt.MapFrom(src => src.Name))
|
||||
.ForMember(dest => dest.EmailAddress, opt => opt.MapFrom(src => src.Receiver.EmailAddress));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user