❔ EFCore, help with atomic update along with complex conditions
Basically, I've been trying to do something like this...
in one atomic operation, to ensure read and write-lock on the affected items. but ot's not possible, since linq to entities cant deal with: requestedQuantity.All(x => x.Value <= i.TotalQuantity - i.TotalReserved)
I've also tried a loop variation, won'tt work properly.
i've been looking at transactions, but they would serialize not per accommodation but the entire method, which would lead to a massive performance bottleneck on this m
ethod. I don't know any SQL so I wouldn't know where to start. Any advice?
in one atomic operation, to ensure read and write-lock on the affected items. but ot's not possible, since linq to entities cant deal with: requestedQuantity.All(x => x.Value <= i.TotalQuantity - i.TotalReserved)
I've also tried a loop variation, won'tt work properly.
i've been looking at transactions, but they would serialize not per accommodation but the entire method, which would lead to a massive performance bottleneck on this m
ethod. I don't know any SQL so I wouldn't know where to start. Any advice?