title: The property ... could not be mapped, because it is of type 'string[]' which is not a supported primitive type or a valid entity type
body: <p>This code is auto-generated class using paste special for XML.</p>
  <pre><code>[System.SerializableAttribute()]
  [System.ComponentModel.DesignerCategoryAttribute(&quot;code&quot;)]
  [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
  public partial class PersonName
  {
      private string firstNameField;
  
      private string surnameField;
  
      private string[] originalScriptNameField;
  
      public string FirstName
      {
          get
          {
              return this.firstNameField;
          }
          set
          {
              this.firstNameField = value;
          }
      }
  
      public string Surname
      {
          get
          {
              return this.surnameField;
          }
          set
          {
              this.surnameField = value;
          }
      }
  
      [System.Xml.Serialization.XmlElementAttribute(&quot;OriginalScriptName&quot;)]
      public string[] OriginalScriptName
      {
          get
          {
              return this.originalScriptNameField;
          }
          set
          {
              this.originalScriptNameField = value;
          }
      }
  }
  </code></pre>
  <p>and I am using Entity Framework (Code-First) and in my context class</p>
  <pre><code>public DbSet&lt;PersonName&gt; PersonNames { get; set; }
  </code></pre>
  <p>But during run time, I get this error</p>
  <blockquote>
  <p>The property ... could not be mapped, because it is of type 'string[]'
  which is not a supported primitive type or a valid entity type. Either
  explicitly map this property, or ignore it using the '[NotMapped]'
  attribute or by using 'EntityTypeBuilder.Ignore' in
  'OnModelCreating'.'</p>
  </blockquote>