❔ [EF.Core] Discard external relations updates during concurrency conflicts
Hello, I'm in a situation where I have to handle a concurrency conflict inside an asp.net Core application using Npgsql.
I'm using the generic approach suggested by Microsoft (more info here https://learn.microsoft.com/en-us/ef/core/saving/concurrency?tabs=data-annotations#resolving-concurrency-conflicts) and handling a
DbUpdateConcurrencyException
.
My DB is made of just 2 tables.
A Payments one
And a PaymentNotifications
one
Whenever there's a conflict detected, and the proposed payment entity is carrying new Notifications
, I want to keep the the new Amount but discard the latest Notifications
:
I can't find a way to persist the notifications that are already in the database. In the end, I find all the notifications from both the concurrent saves. Can you help me with that?1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.