title: The property is part of the object's key information and cannot be modified and I NEEDto modify it
body: <p><strong>Scenario</strong></p>
  
  <p>I am working on a program where I enter multiple IDs (they are primary keys) and enter the details once, So example if I enter PA1,PA2,and PA3, I need to save all those with the same details. To accomplish this I have passed the id into a string, then do a for each with the intention of changing the ID every loop while still entering the same details. As you can see in my code</p>
  
  <pre><code>public async Task&lt;ActionResult&gt; MassCreate([Bind(Include = " refno,rec_fname,rec_lname,signature,date,time")] delivery delivery,  string hiddenIDnumber)
      {
          if (ModelState.IsValid)
          {
              hiddenIDnumber= hiddenIDnumber.Trim();
  
              List&lt;string&gt; listStrLineElements = hiddenIDnumber.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList(); 
              foreach (string str in listStrLineElements)
              { 
                   delivery.refno = str; 
                  db.dbo_delivery.Add(delivery);
                  await db.SaveChangesAsync();
              }
  
            // db.dbo_delivery.Add(dbo_delivery);
             //  await db.SaveChangesAsync(); 
              return RedirectToAction("Success", "Delivery");
          }
  </code></pre>
  
  <p><strong>Error</strong>
     The property 'refno' is part of the object's key information and cannot be modified.</p>
  
  <p>is the error I am getting because refno is the primary key. </p>
  
  <p>In reading individuals have solved this using <code>Common.DataContext.Detach(object);</code> however I am unsure of how to implement this.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Regards</p>