I'm currently defining my map like this:
CreateMap<Request, RequestDetailsDTO>()
.ForMember(dto => dto.Approvals, conf => conf.MapFrom(x => x.ApprovalStatus.OrderBy(x => x.Position)));
but now I'm wanting to switch to using attributes on the RequestDetailsDTO instead. Is it possible to specify the ordering with an attribute, or does that require I stick with the fluent version?
For example, it would be nice to be able to do something like this:
[AutoMap(typeof(Request))]
public class RequestDetailsDTO {
[SourceMember(nameof(ApprovalStatus), OrderBy = nameof(ApprovalStatus.Position)]
public IEnumerable<RequestApprovalStatusDTO> Approvals { get; set; } = default!;