Hello,
The business scenario is that we exposed a web service that is being called by the biztalk server that passes the XML string as an input parameter.
We deserialize the XML string into class object. The main object will have individual properties including the list object.
For Example, Lets assume that class structure is as below.
Class ClassInfo
{
public string ClassNumber{get;set;}
public string ClassName{get;set}
public List<student> StudentList{get;set;}
public List<professor> ProfessorsList{get;set;}
}
Lets assume that I would need to insert ClassNumber and ClassName to one table, kind of a new look value, and StudentList and ProfessorsList to two different tables..
If I were to insert multiple rows into a table( StudentList and ProfessorsList list multiple tables) from ADO .NET, I see the following scenarios, I would like to know if there is any better approach than this.... Also, I would like to pass all the parameters as an input parameters to the stored procedure that does the insertion for me.
1. Calling SP inside for each loop for each student and professor.
2. passing collection to SP using table type parameter.