I am using C#, Entity Framework. SQL Server for the development. I have a method which has two parameters (
int ID, List<String> _listobj). For each ID, there is a list of obj. All of these IDs and lists will be inserted into different tables in database. So the question is: what's the best practice for this? I have couple of options:
In C#, split the
list<obj>as single value, then create a stored procedure which takes two parameters (
ID, str), then the C# will call the stored procedure many times depending on the size of the list
list<obj>as two parameters to the stored procedure and let the stored procedure split the
list<obj>. This way C# will only call the stored procedure once
Is the second strategy doable? If yes, which is better in terms of performance?