title: Project a name-value list into an object
body: <p>I want to be able to save an arbitrary flat object into the name-value list.</p>
  
  <pre><code>public class NameValueListEntity
  {
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
  
      [InverseProperty(nameof(NameValueListContentEntity.Entity))]
      public ICollection&lt;NameValueListContentEntity&gt; Content { get; set; }
  }
  
  public class NameValueListContent
  {
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
  
      [ForeignKey("entity_fk")]
      public NameValueListEntity Entity { get; set; }
  
      public string Name { get; set; }
      public string Value { get; set; }
  }
  
  public class ObjectToSave
  {
      public string Prop1 { get; set; }
      public string Prop2 { get; set; }
  }
  </code></pre>
  
  <p>I could use reflection to manually assemble/parse the list, but it will create a lot of overhead. Lots of <code>NameValueListContent</code> objects will be needlessly created both during the saving and the reading. Could it somehow be omitted? Especially during the reading, which is very performance-sensitive in my case.</p>