Execute a stored procedure with Entity FrameWork?

1

I am trying to execute an SP that does not return a result (it does not generate any complex type or entity), but this does not appear as a function in the context of the EF, I need some step or in what way I can execute it, this SP It has input parameters.

var context = (BD_BROKER_LIQUIDACION_ENTITIES)UnidadDeTrabajo;
context.SP????<-- aqui no aparece mi funcion
    
asked by GoGonta 03.08.2018 в 18:08
source

1 answer

1

This was the option that I found to send parameters and execute the SP, in the end it is not necessary to map the sp in the model.

ObjectParameter oPVC_MES_ARCHIVOParameter = new ObjectParameter("OPVC_MES_ARCHIVO", Periodo);
                ObjectParameter iD_USUARIOParameter = new ObjectParameter("ID_USUARIO", objCredenciales.USUARIO);
                context.ExecuteFunction("SPIN_SAVE_VALIDADOR", oPVC_MES_ARCHIVOParameter, iD_USUARIOParameter);
    
answered by 07.08.2018 / 15:58
source