EnvelopeGenerator/EnvelopeGenerator.Application/SQL/EnvelopeReceiverCreateReadSQL.cs
Developer 02 4cabaf3191 Refactor envelope handling to use ISQLExecutor
This commit removes the IEnvelopeExecutor interface and its implementation, replacing it with ISQLExecutor. The CreateEnvelopeAsync method in Extension.cs now directly creates DynamicParameters. The CreateEnvelopeCommandHandler has been updated to utilize ISQLExecutor. Additionally, the EnvelopeExecutor class has been removed, and a new SQL command class, EnvelopeReceiverCreateReadSQL, has been added for managing envelope receiver SQL operations.
2025-05-06 01:30:59 +02:00

34 lines
708 B
C#

using EnvelopeGenerator.Application.Contracts.SQLExecutor;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.SQL;
/// <summary>
///
/// </summary>
public class EnvelopeReceiverCreateReadSQL : ISQL<Envelope>
{
/// <summary>
///
/// </summary>
public string Raw => @"
USE [DD_ECM]
GO
DECLARE @OUT_RECEIVER_ID int
DECLARE @ENV_UID varchar(36) = @ENV_UID
EXEC [dbo].[PRSIG_API_CREATE_RECEIVER]
@ENV_UID = @ENV_UID,
@EMAIL_ADRESS = @EMAIL_ADRESS ,
@SALUTATION = @SALUTATION,
@PHONE = @PHONE,
@OUT_RECEIVER_ID = @OUT_RECEIVER_ID OUTPUT
SELECT TOP(1) *
FROM TBSIG_ENVELOPE_RECEIVER
WHERE [GUID] = @OUT_RECEIVER_ID;
";
}