I am adding functions to an existing ASP.NET project. The code calls a stored procedure to add a row to a specific table. I need an option that allows one of the columns to have multiple values, in which case a row will be added for each value in this column.
I know that I can call my insert method once for each line, but that sounds terribly inefficient. I know that I can write several lines separated by semi-colonies and send them to the database with one request. But existing code calls a stored procedure, and so for several insert statements, you need to change the value of the existing code.
Please note that several values will be stored as several lines in a text field, one line for each value and, obviously, should be checked for correct input.
Is there an easier way to approach this?
source
share