Refactor SQL execution in DocumentCreateReadSQL

Changed namespace for DocumentCreateReadSQL and updated SQL command to use formatted strings for parameters. Simplified DocumentExecutor to directly use the formatted SQL, enhancing clarity and reducing complexity in parameter handling.
This commit is contained in:
Developer 02
2025-05-07 13:21:17 +02:00
parent a781440252
commit ad855b77cd
2 changed files with 5 additions and 5 deletions

View File

@@ -10,17 +10,17 @@ namespace EnvelopeGenerator.Application.SQL;
public class DocumentCreateReadSQL : ISQL<EnvelopeDocument>
{
/// <summary>
///
/// Base64, OUT_UID
/// </summary>
public string Raw => @"
USE [DD_ECM]
DECLARE @BYTE_DATA1 as VARBINARY(MAX)
SET @BYTE_DATA1 = CONVERT(VARBINARY(MAX),'@Base64')
SET @BYTE_DATA1 = CONVERT(VARBINARY(MAX),{0})
DECLARE @OUT_DOCID int
EXEC [dbo].[PRSIG_API_ADD_DOC]
@ENV_UID = @OUT_UID,
@ENV_UID = {1},
@BYTE_DATA = @BYTE_DATA1,
@OUT_DOCID = @OUT_DOCID OUTPUT