我如何检查 `StateEntries` 属性?

How can I examine the `StateEntries` property?

我收到错误:

System.Data.Entity.Infrastructure.DbUpdateException : Invalid data encountered. A required relationship is missing. Examine StateEntries to determine the source of the constraint violation.

所以,我更改了抛出异常的代码。现在我正在捕捉异常,目的是阅读 StateEntries。但是在 Watch window in Visual Studio 2019.

的帮助下,我无法在异常中找到 StateEntries
try
{
    context.SaveChanges();
}
catch (Exception e)
{
    var stop = 0; //I put a breakpoint here and examine the **e**
}

你能不能在详细说明 StateEntries 的异常中指出 属性?

尝试深入 InnerException,直到到达最里面的那个。