我们有一个类似于https://github.com/aspnet/EntityFrameworkCore/issues/11888中的模型。
就像上面的问题一样,当使用SqlServer时,我们会得到一个异常
Unhandled Exception: System.InvalidOperationException: Unable to save changes because a circular dependency was detected in the data to be saved: 'Person [Added] <- Owner { 'OwnerId' } Car [Added] <- ActiveCar { 'ActiveCarId' } Person [Added]'.
但是,当我们使用InMemory数据库进行单元测试时,不会引发此异常。 是否也可以通过内存数据库来获取此异常?