title: How to store JSON in an entity field with EF Core?
body: <p>I am creating a reusable library using .NET Core (targeting .NETStandard 1.4) and I am using Entity Framework Core (and new to both).  I have an entity class that looks like:</p>
  
  <pre><code>public class Campaign
  {
      [Key]
      public Guid Id { get; set; }
  
      [Required]
      [MaxLength(50)]
      public string Name { get; set; }
  
      public JObject ExtendedData { get; set; }
  }
  </code></pre>
  
  <p>and I have a DbContext class that defines the DbSet:</p>
  
  <pre><code>public DbSet&lt;Campaign&gt; Campaigns { get; set; }
  </code></pre>
  
  <p>(I am also using the Repository pattern with DI, but I don't think that is relevant.)</p>
  
  <p>My unit tests give me this error:</p>
  
  <blockquote>
    <p>System.InvalidOperationException: Unable to determine the relationship
    represented by navigation property 'JToken.Parent' of type
    'JContainer'. Either manually configure the relationship, or ignore
    this property from the model..</p>
  </blockquote>
  
  <p>Is there a way to indicate that this is not a relationship but should be stored as a big string?</p>