I was just asked how to go about passing an array of integers into a stored procedure or function using LINQ to SQL. As I have never done this and don’t see anything on Google I figured I would ask here. Thanks!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If it is a table-valued parameter, then AFAIK there is no direct support at the moment. ADO.NET does though. Another option is to build a delimited string, and split it (perhaps in a udf) at the db. Then it is just a
[n]varchar(size)at the db, andstringin your code – simply to handle.