Colder.Admin.AntdVue icon indicating copy to clipboard operation
Colder.Admin.AntdVue copied to clipboard

关于事务问题BUG???

Open ysq5202121 opened this issue 4 years ago • 0 comments

The instance of entity type 'PackageInfo' cannot be tracked because another instance with the same key value for {'PackageInfoID'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values. 一个方法里面调用一个事务方法和一个非事务,此时两个方法都有操作同一个表的情况下面会报这个错误,但是如果不使用事务则无问题。 现在修改事务AOP增加DisposeTransaction可解决事务问题。不知道这算不算问题?

ysq5202121 avatar Jan 30 '21 07:01 ysq5202121