I have a stored procedure with table valued parameter. I have to call it from Entity framework in .net core.
I couldn't find any API on context object.
I have tried with ADO.net API's and it worked but now I have to call it from EF in .net core. Stored procedure which I have to call returning result which I have to catch.
My sample SP as below
CREATE PROCEDURE [dbo].[GetMyData]
@MyRequest [dbo].[MyRequestType] Readonly
As
BEGIN
--Its sample SP thats why returned request table as it is
select * from @MyRequest
END
MyRequestType
is User defined table type
its structure is as below
CREATE TYPE [dbo].[MyRequestType] AS TABLE(
[Id] [numeric](22, 8) NULL,
[Col1] [bigint] NULL,
[Col2] [numeric](22, 8) NULL
)
I am using Code first approach in EF core
Any help will be appreciated.