Coldairarrow / Colder.Admin.AntdVue

Admin Fx Based On .NET 5 + Ant Design Vue
MIT License
1.24k stars 386 forks source link

关于事务问题BUG??? #135

Open ysq5202121 opened 3 years ago

ysq5202121 commented 3 years ago

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可解决事务问题。不知道这算不算问题?