环境:
.NET5.0
VS2019 社区版
创建以简单的控制台应用。使用Code Frist,
功能简单的一对多的数据更新。
Database operation expected to affect 1 row(s) but actually affected 0 row(s).
Data may have been modified or deleted since entities were loaded.
See
http://go.microsoft.com/fwlink/?LinkId=527962
for information on understanding and handling optimistic concurrency exceptions.
遇到这个问题在网上一搜全是关于并发的问题。搞得很严重似的,如图:报错代码