title: EF Core doesn't throw exceptions on SaveChanges()/SaveChangesAsync()
body: <p>I have solution where project containing data layer information(all models and dbContext) is referenced by windows service project and ASP.NET MVC app since they use the same data structure.</p>
  <p>Recently while working on windows service I noticed huge memory usage in debugger when ever there is an issue with constraints but no error was thrown. As I was troubleshooting it I realized that methods <code>SaveChanges()</code> and <code>SaveChangesAsync()</code> never throw any type of exception and as result I couldn't catch exception in try/catch block. I can see error &quot;Failed executing DbCommand...&quot; in output window but program would continue to run some loop in DbContext and memory usage would increase at rate of 500MB per second and would rise to maximum available without crashing application.</p>
  <p>I managed to record trace log on creating new location entry with non-existent FK, and it seems that after error occurs in dbContext EF starts &quot;Select&quot; querys for every DBSet defined in DbContext and starts tracking for every entity from select query result. You can see that part of log on picture below...</p>
  <p><a href="https://i.stack.imgur.com/peoKS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/peoKS.png" alt="enter image description here" /></a></p>
  <p>I tried creating new ASP.NET MVC project with EF Core and can't reproduce this issue on clean project so this issue is probably in configuration or something similar.</p>
  <p>This whole solution originally started on .NET Framework 4.5 and was later converted(rewritten) to .NET Core 3.1 and finally updated to .NET 5. Data layer was extracted in separate project from MVC project on .NET Core 3.1 version when windows service was needed. I have updated every package to latest version, I tried different configuration options for DbContext and logging solutions but nothing changed. I can reproduce this issue by manually setting wrong ID for constraints on any model so it's not related to specific Model or validation. Unfortunately I can't pin point exact time when this behavior become a thing in solution...</p>
  <p>Does anyone know what could be cause of this behavior or where to start troubleshooting it?</p>