StoredProcedure in SQL Server by passing a C #

1

I would like to pass a list of parameters to a procedure, how to do this process?

I did some research and found that it is possible to create a TABLE TYPE and use it in the procedure parameters, but I could not use it, for example.

CREATE TYPE TABLE_EXEC_PROCEDURE_MASSIVE_EXCHANGE_RELEASE_IMPORTED_FILE AS TABLE
(
    ID_MASSIVE_EXCHANGE UNIQUEIDENTIFIER NOT NULL,
    ID_IMPORTED_FILE_MASSIVE_EXCHANGE UNIQUEIDENTIFIER NOT NULL,
    POSICAO INT NOT NULL,
    USUARIO_EMAIL VARCHAR(250) NOT NULL,
    USUARIO_NOME VARCHAR(250) NOT NULL,
    JUSTIFICATIVA VARCHAR(MAX) NOT NULL
)

    CREATE PROCEDURE SP_EXEC_MASSIVE_EXCHANGE_RELEASE_IMPORTED_FILE
    @TABLE TABLE_EXEC_PROCEDURE_MASSIVE_EXCHANGE_RELEASE_IMPORTED_FILE READONLY AS
    BEGIN

    END

Would anyone have an example?

    
asked by anonymous 06.04.2018 / 17:35

0 answers