title: The property 'myFk' on entity type 'Order' has a temporary value
body: <p>I have a one-to-many relationship with an order and some orderlines.</p>
  
  <p>When updating the runtime from 2.0.? to NetCore 2.2.7 I have started to get this message:</p>
  
  <blockquote>
    <p>System.InvalidOperationException: The property 'OrderId' on entity
    type 'OrderLineDto' has a temporary value.  Either set a permanent
    value explicitly or ensure that the database is configured to generate
    values for this property.</p>
  </blockquote>
  
  <p>Did anything change when updating, and what exactly is this error? In the OrderlineDto I do have an OrderId, but I have never done anything to maintain it, nor would I assume I should.</p>
  
  <p>Simplified my code looks like this:</p>
  
  <pre><code>Order o = new OrderDto() {Foo = "Foo"};
  o.Lines.Add(new OrderlineDto(whatever) {Bar = "Bar"});
  _db.Orders.Add(o);
  _db.SaveChanges();
  </code></pre>
  
  <p>OrderlineDto is database first and looks like this:</p>
  
  <pre><code>[Key]
  [Column("Id_pk")]
  public int Pk { get; set; }
  public int OrderId { get; set; }
  public virtual OrderDto Order { get; set; }
  </code></pre>
  
  <p>This also seems to still work on some computers, but not on others. So it could be a bad installation or something, but if a codechange could be made that solves it explicit then I am also interested in that.</p>