title: EF Core affected 0 rows on SaveChanges()
body: <p>I having following code:</p>
  
  <pre><code>using var db = new DataContext();
  var foobar = db.Foobar.First();
  foobar.NavProperties.Add(new NavProperty());
  db.SaveChanges();
  </code></pre>
  
  <p>And get this error:</p>
  
  <blockquote>
    <p>Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded</p>
  </blockquote>
  
  <p>What could cause this error? Any ideas? Please tell me if I need to provide more information.
  Thanks very much in advance!</p>