title: Unable to track an instance of type in .Net core?
body: <p>I am getting below error for one of the tables. the table doesn't have a primary key. How to handle this?
  I am trying to add new row to the table.</p>
  
  <p>Error </p>
  
  <pre><code>Unable to track an instance of type 'CommonDataZipInfo' because it does not have a primary key. 
  Only entity types with primary keys may be tracked.'
  </code></pre>
  
  <p>DataContext.cs</p>
  
  <pre><code>modelBuilder.Entity&lt;CommonDataZipInfo&gt;(entity =&gt;
          {
              entity.HasNoKey();
  
              entity.ToTable("COMMON_DATA_ZIP_INFO");
  
              entity.Property(e =&gt; e.AddDate).HasColumnType("datetime");
  
              entity.Property(e =&gt; e.ManuscriptNum)
                  .HasColumnName("manuscript_num")
                  .HasMaxLength(32)
                  .IsUnicode(false);
  
              entity.Property(e =&gt; e.ZipfileName)
                  .HasMaxLength(32)
                  .IsUnicode(false);
          });
  </code></pre>
  
  <p>Program.cs</p>
  
  <pre><code> var CommonDataZipInfo = new CommonDataZipInfo()
   {
        ManuscriptNum = ManuscriptNum,
        ZipfileName = Path.GetFileName(fileName),
        AddDate = DateTime.Now
    };
    context.CommonDataZipInfo.Add(CommonDataZipInfo);
    context.SaveChanges();
  </code></pre>