How to persist a list of strings with Entity Framework Core? : <p>Let us suppose that we have one class which looks like the following:</p>

<pre><code>public class Entity
{
    public IList&lt;string&gt; SomeListOfValues { get; set; }

    // Other code
}
</code></pre>

<p>Now, suppose we want to persist this using EF Core Code First and that we are using a RDMBS like SQL Server.</p>

<p>One possible approach is obviously to create a wraper class <code>Wraper</code> which wraps the string:</p>

<pre><code>public class Wraper
{
    public int Id { get; set; }

    public string Value { get; set; }
}
</code></pre>

<p>And to refactor the class so that it now depends on a list of <code>Wraper</code> objects. In that case EF would generate a table for <code>Entity</code>, a table for <code>Wraper</code> and stablish a "one-to-many" relation: for each entity there is a bunch of wrapers.</p>

<p>Although this works, I don't quite like the approach because we are changing a very simple model because of persistence concerns. Indeed, thinking just about the domain model, and the code, without the persistence, the <code>Wraper</code> class is quite meaningless there.</p>

<p>Is there any other way persist one entity with a list of strings to a RDBMS using EF Core Code First other than creating a wraper class? Of course, in the end the same thing must be done: another table must be created to hold the strings and a "one-to-many" relationship must be in place. I just want to do this with EF Core without needing to code the wraper class in the domain model.</p>
