DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 4 — oracle-tech

    Forum Stats

  • 3,715,657 Users
  • 2,242,821 Discussions
  • 7,845,481 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 4

3975927
3975927 Member Posts: 11
edited June 2019 in ODP.NET

当前环境:

netcore 2.2  / oracle 11.2 / Oracle.EntityframeworkCore(2.19.0-beta4)

在_dbContext.SaveChangesAsync()  报错

DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 449 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.

现有情况分析:

1.不存在并发操作问题,是单线程执行操作

2.是对单一entity操作,但这个entity包含多个其他类型entity,对应多张其他表。

3.这是Oracle.EntityframeCore的问题

SaveChangesAsync

Answers

Sign In or Register to comment.