How do I get original values for a navigation collection property, in EF Core?
<p>My EF Core entity:</p>

<pre><code>public class Order {
    public string Code { get; set; }  
    public ICollection&lt;LineItem&gt; LineItems { get; set; }  
}
</code></pre>

<p>I can get the original value for the <code>Code</code> property using:</p>

<pre><code>context.Entry(myOrder).OriginalValues["Code"]
</code></pre>

<p>But if I try that for the <code>LineItems</code> navigation collection property, then it throws with:</p>

<p><code>The property LineItems on entity type Order is being accessed using the 'Property' method, but is defined in the model as a navigation property. Use either the 'Reference' or 'Collection' method to access navigation properties.</code></p>

<p>That exception message doesn't refer to methods I can find.</p>

<p>So how do I get original values for a navigation collection property?</p>