title: Entity Framework - Code First - Can't Store List<String>
body: <p>I wrote such class:</p>
  
  <pre><code>class Test
  {
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
      [Required]
      public List&lt;String&gt; Strings { get; set; }
  
      public Test()
      {
          Strings = new List&lt;string&gt;
          {
              "test",
              "test2",
              "test3",
              "test4"
          };
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>internal class DataContext : DbContext
  {
      public DbSet&lt;Test&gt; Tests { get; set; }
  }
  </code></pre>
  
  <p>After run code:</p>
  
  <pre><code>var db = new DataContext();
  db.Tests.Add(new Test());
  db.SaveChanges();
  </code></pre>
  
  <p>my data is getting saved but just the <code>Id</code>. I don't have any tables nor relationships applying to <strong>Strings</strong> list. </p>
  
  <p>What am I doing wrong? I tried also to make <strong>Strings</strong> <code>virtual</code> but it didn't change anything.</p>
  
  <p>Thank you for your help.</p>