title: Entity Framework map collection property to one column
body: <p>I have model:</p>
  
  <pre><code> public class FlyerPage
  {
      public Guid Id { get; set; }
      public string Picture { get; set; }
      public int? Page { get; set; }
  
      public string Text { get; set; }
  
      public ICollection&lt;string&gt; Keywords { get; set; }
  
      public Guid FlyerId { get; set; }
  
      public virtual Flyer Flyer { get; set; }
  }
  </code></pre>
  
  <p>And I want to map <code>Keywords</code> to one column in <code>FlyerPage</code> table. 
  I think the best way it to split it into values separated by comma like</p>
  
  <pre><code>"one", "two", "three". 
  </code></pre>
  
  <p>How to do it? 
  Via FluentAPI. </p>
  
  <h1>EDIT - To another table</h1>
  
  <pre><code>The type 'ICollection&lt;string&gt;' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 
  
  
   modelBuilder.Entity&lt;FlyerPage&gt;().Map(m =&gt;
          {
              m.Property(p =&gt; p.Keywords);
              m.ToTable("Keyword", "Flyers.Page");
          });
  </code></pre>
  
  <h1>EDIT 2: ok this work</h1>
  
  <pre><code>        modelBuilder.Entity&lt;FlyerPage&gt;().Map(m =&gt;
          {
              m.Properties(p =&gt; p.Keywords);
              m.ToTable("FlyerPageKeywords");
          });
  </code></pre>
  
  <p>But how connect it will many to many? </p>