Reputation: 907
Using LINQ to SQl I am storing a list to a variable. In my controller. I now need to pass this list stored in the variable to an XML parameter that can be called in another stored procedure. Can someone show me how to store the last XML? Thanks!
var myVariableToAList = (from s in myResults.MyResultsList
select new MyResultsViewModel
{
Id = s.Id,
Name = s.Name,
PhoneNo1 = s.PhoneNo1,
PhoneNo2 = s.PhoneNo2
}).ToList();
myVariableToAList = ( I need to store this list as an XML Parameter)
Upvotes: 0
Views: 109
Reputation: 52
You could try to store that list as JSON into an XML parameter.
Upvotes: 1