feat(envelopes): add support for SQLExecutor or repository when creating envelopes

- Refactored `CreateEnvelopeCommandHandler` to resolve dependencies via `IServiceProvider`
- Added `IRepository<Envelope>` to allow repository-based envelope creation
- Updated handler logic to choose between `IEnvelopeExecutor` and repository based on `UseSQLExecutor` flag
This commit is contained in:
2025-09-01 17:23:40 +02:00
parent ee7eb08e75
commit 00077a647a
2 changed files with 21 additions and 9 deletions

View File

@@ -36,7 +36,10 @@ public record CreateEnvelopeCommand : IRequest<EnvelopeDto?>
public int UserId { get; set; }
/// <summary>
/// if true, use <seealso cref="IEnvelopeExecutor"/>; otherwise, use <seealso cref="IRepository{Envelope}"/>
/// Determines which component is used for envelope processing.
/// When <c>true</c>, processing is delegated to <see cref="IEnvelopeExecutor"/>;
/// when <c>false</c>, <see cref="IRepository{Envelope}"/> is used instead.
/// Note: <see cref="IRepository{Envelope}"/> should only be used in testing scenarios.
/// </summary>
[JsonIgnore]
[NotMapped]