Refactor envelope creation logic and add IEnvelopeExecutor

Updated CreateEnvelopeCommandHandler to use IEnvelopeExecutor for managing envelope creation. Introduced CreateParmas method for parameter handling in CreateEnvelopeSQL. Corrected Dapper type mapping method name and added service registration for IEnvelopeExecutor in DependencyExtensions. Refactored SQLExecutor to enhance encapsulation. Created EnvelopeExecutor class implementing IEnvelopeExecutor for dedicated envelope operations.
This commit is contained in:
Developer 02
2025-05-05 16:11:29 +02:00
parent 39ff4b8867
commit b93ba6be17
6 changed files with 111 additions and 24 deletions

View File

@@ -0,0 +1,19 @@
using Dapper;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
/// <summary>
///
/// </summary>
public interface IEnvelopeExecutor : ISQLExecutor
{
/// <summary>
///
/// </summary>
/// <param name="parameters"></param>
/// <param name="addUser"></param>
/// <param name="cancellation"></param>
/// <returns></returns>
Task<Envelope?> CreateEnvelopeAsync(DynamicParameters parameters, bool addUser = true, CancellationToken cancellation = default);
}