How to pass large number of parameters in stored procedure from code to SQL Server

前端 未结 4 1548
情话喂你
情话喂你 2021-01-24 05:13

How to pass a large number of parameters (say 20+) to stored procedure from code?

Like we can group all the parameters in one class object and then pass it across, but h

4条回答
  •  清歌不尽
    2021-01-24 05:37

    You shouldn't normally need lots of variables to store parameters; you will need to add SqlParameter (etc) per arg, but you can set them in a loop (/etc).

提交回复
热议问题