Refactor envelope creation SQL logic

Removed `CreateEnvelopeSQL` and introduced `EnvelopeCreateReadSQL` to handle envelope creation logic. Updated the `Extension` class methods and modified `CreateEnvelopeAsync` in `EnvelopeExecutor` to utilize the new SQL class.
This commit is contained in:
Developer 02
2025-05-05 16:30:39 +02:00
parent b93ba6be17
commit 3955a3232d
2 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ public class EnvelopeExecutor : SQLExecutor, IEnvelopeExecutor
public async Task<Envelope?> CreateEnvelopeAsync(DynamicParameters parameters, bool addUser = true, CancellationToken cancellation = default)
{
using var connection = new SqlConnection(Params.ConnectionString);
var sql = Provider.GetRequiredService<CreateEnvelopeSQL>();
var sql = Provider.GetRequiredService<EnvelopeCreateReadSQL>();
await connection.OpenAsync(cancellation);
var envelopes = await connection.QueryAsync<Envelope>(sql.Raw, parameters);
var envelope = envelopes.FirstOrDefault();