Make RecentReceiverSuggestionDto immutable; refactor query

Updated RecentReceiverSuggestionDto to use `init` properties,
adding immutability and a new `LastUsedAt` field. Refactored
ReadRecentReceiverSuggestionsQueryHandler to simplify query
logic, remove `IMapper` dependency, and improve determinism
in results. Introduced tie-breaking for duplicate timestamps
and optimized ordering by `LastUsedAt` and `EmailAddress`.
Removed redundant `Include` and mapping steps for clarity.
This commit is contained in:
2026-10-05 16:43:34 +02:00
parent bf23e88cf8
commit 5627483589
2 changed files with 42 additions and 14 deletions

View File

@@ -2,7 +2,9 @@ namespace EnvelopeGenerator.Application.Common.Dto.Receiver;
public class RecentReceiverSuggestionDto
{
public required string FullName { get; set; }
public required string FullName { get; init; }
public required string EmailAddress { get; set; }
public required string EmailAddress { get; init; }
public required DateTime LastUsedAt { get; init; }
}