I use sql-server 2012 in my project.
I have stored procedure, I fire and passing parameters to the stored procedure with help of entity framework 6 method called ExecuteSqlCommand
.
_context.database.ExecuteSqlCommand("SP_GetRecords", here all params)
One of the parameters that I try to sent to stored procedure is list of integers.
I was advised to create table-valued parameters on sql-server and pass to it array or list.
But don't know how to pass this list or array of integers using ExecuteSqlCommand
method to table-valued parameter.
Any idea how to pass list or array type inside ExecuteSqlCommand
?