Added a new static class `Extension` in `Extension.cs` to encapsulate methods for creating parameters and asynchronous envelope creation. Removed previous implementations from `EnvelopeCreateReadSQL.cs` for better organization. Updated `using` directives in `CreateEnvelopeCommandHandler.cs` and `EnvelopeCreateReadSQL.cs` for consistency.
29 lines
704 B
C#
29 lines
704 B
C#
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
|
|
namespace EnvelopeGenerator.Application.SQL;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class EnvelopeCreateReadSQL : ISQL<Envelope>
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Raw => @"
|
|
USE [DD_ECM];
|
|
DECLARE @OUT_UID varchar(36);
|
|
|
|
EXEC [dbo].[PRSIG_API_CREATE_ENVELOPE]
|
|
@USER_ID = @UserId,
|
|
@TITLE = @Title,
|
|
@TFAEnabled = @TfaEnabled,
|
|
@MESSAGE = @Message,
|
|
@OUT_UID = @OUT_UID OUTPUT;
|
|
|
|
SELECT TOP(1) *
|
|
FROM [dbo].[TBSIG_ENVELOPE]
|
|
WHERE [ENVELOPE_UUID] = @OUT_UID;
|
|
";
|
|
} |