title: How to deserialize Json file in c # to insert in table
body: <p>I have the following json and I am trying to deserialize to insert it into a SQL table, I have tried to use JsonConvert and JObject without positive result</p>
  
  <p><strong>Json</strong></p>
  
  <pre><code>{
  "id": "123123",
  "publisherId": "Empresa",
  "notificationType": "Orden",
  "headers": {
      "providerId": "ABC123"
  },
  "content": {
      "id": "987987",
      "orderId": "4444444",
      "apiName": "Services",
      "method": "GetOrder",
      "verb": "GET",
      "urlMethod": "https://api.com"
  },
  "contentVersion": "1.0"
  }
  </code></pre>
  
  <p><strong>Model</strong></p>
  
  <pre><code>    public class Headers
      {
          public string providerId { get; set; }
      }
  
      public class Content
      {
          public string id { get; set; }
          public string orderId { get; set; }
          public string apiName { get; set; }
          public string method { get; set; }
          public string verb { get; set; }
          public string urlMethod { get; set; }
      }
  
      public class RootModel
      {
          public string id { get; set; }
          public string publisherId { get; set; }
          public string notificationType { get; set; }
          public Headers headers { get; set; }
          public Content content { get; set; }
          public string contentVersion { get; set; }
      }
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>    public static List&lt;Models.RootModel&gt; getJson()
      {
          using (StreamReader r = new StreamReader("c:\\LOG\\20180528\\201805281039.json"))
          {
              string json = r.ReadToEnd();
              return JsonConvert.DeserializeObject&lt;Models.RootModel&gt;(json);
          }
      }
  </code></pre>
  
  <p>You are giving me the following error</p>
  
  <blockquote>
    <p>Error CS0029  No se puede convertir implícitamente el tipo 'WebApplication1.Models.RootModel' en 'System.Collections.Generic.List'</p>
  </blockquote>
  
  <p>I really do not know if I'm on the right track, is it necessary to deserialize to insert in the DB, or is there another way?</p>
  
  <p>Thanks in advance for the help</p>