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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user