Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BUG: DbUpdateConcurrencyException when updating and inserting multiple records

4119029Oct 25 2019 — edited Dec 7 2019

When updating and adding multiple rows I am getting a DbConcurrency exception.  Note no table has more than 10 rows in it.  This only occurs when multiple rows are updated AND inserted within the same SaveChanges() operation.

Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: 'Database operation expected to affect 1 row(s) but actually affected 2858 row(s).

The sample code is located here: https://github.com/inferno31/oefc-concurrency-issue

Reproduction instructions here: https://github.com/inferno31/oefc-concurrency-issue/blob/master/WFConcurrencyIssue/Readme.md

Comments
Post Details
Added on Oct 25 2019
6 comments
532 views