title: How to write a JSON deserialized nested object into a database
body: <p>Via REST I consume and deserialize a Json file (here I am using VB but a C# solution would be good as well)</p>
  
  <pre><code>Dim allDATA As List(Of GeneralInfo) = JsonConvert.DeserializeObject(Of List(Of GeneralInfo))(jstr)
  </code></pre>
  
  <p>and store it in an object</p>
  
  <pre><code>Public Class FullData
      Public Property userRunID As ULong
      Public Property data As List(Of String)
  End Class
  
  Public Class GeneralInfo
      Public Property id As ULong
      Public Property name As String
      Public Property data As List(Of FullData)
  End Class
  </code></pre>
  
  <p>In debug mode I can click through the object and see all the data. Now I want to store the data in a database. For that I created two tables with an extra GeneralInfoId col on FullData to provide the relationship. With this code I want to write the data</p>
  
  <pre><code>Private Shared Sub AddData(ByRef myGDI As GeneralInfo)
  ...
          Using command As SqlCommand = New SqlCommand("INSERT INTO GeneralInfo VALUES(@id, @name)", con)
              command.Parameters.Add(New SqlParameter("id", myGDI.id))
              command.Parameters.Add(New SqlParameter("name", myGDI.name))
              command.ExecuteNonQuery()
          End Using
  
          Using command As SqlCommand = New SqlCommand("INSERT INTO FullData VALUES(@GeneralInfoID, @userRunID, @data)", con)
              command.Parameters.Add(New SqlParameter("GeneralInfoID", myGDI.id))
              command.Parameters.Add(New SqlParameter("userRunID", myGDI.))
              command.Parameters.Add(New SqlParameter("data", myGDI.))
              command.ExecuteNonQuery()
          End Using
  ...
  End Sub
  </code></pre>
  
  <p>As you can see I do not know how to get to access the <code>FullData</code> Object's (<code>myGDI.???</code>) data. Anyone who can help me here?</p>
  
  <p>EDIT:
  I get survey data for all participants of a company in the json file. The <code>generalinfo</code> object has data about the company (ID, Name (of the company)) the <code>data</code> property contains a list of data of the participants like theire individual id (<code>userRunID</code>) and their questionaire <code>data</code> like Name, and result for each question (Simon;Garfunkel;1;2;3;5;5;4;4;...).
  I want to write these data into a database. It would be (first off) ok to save the data in Fulldata.data as a string in the database.</p>