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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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

Processing

Post Details

Added on Oct 25 2019
6 comments
527 views