I have my code setting up a parameter for QuestionsCount and then for Questions:
parameterList.Add(new SqlParameter("@QuestionsCount", chunkSize));
var p = new SqlParameter("@Questions", questions);
p.TypeName = "dbo.QuestionList";
parameterList.Add(p);
Is there a way that I can combine the last three lines and create a new SqlParameter with the typeName. I was looking at the definitions but cannot find one that takes the value (questions) and the TypeName "dbo.QuestionList".
AddWithValue<T>(this SqlParameterCollection that, string parameterName, string typeName, IEnumerable<T> rows)that handles setting the type etc. plus emptyIEnumerable<T>s get passed down asnull(why that's a requirement I have no idea...)