I am using Entity Framework with C# to make a Silverlight application. I have written some stored procedures which perform database intensive operations and I need to call them from Entity Framework after passing some parameters. In one of the steps, the users select a list of items for which they would need more details. This list of items (in the form of an array of integer IDs) need to be passed to the stored procedure to retrieve more information about those IDs. How do I pass this parameter to the stored procedure?
Share
You can’t pass table-valued parameters to SQL with the Entity Framework.
What you can do is create a delimited string like
"1|2|3|4"and create a Split function in SQL that will return a table.Then if you need to do something like select all items from a table based on what is in the delimited string passed to your proc: