abp icon indicating copy to clipboard operation
abp copied to clipboard

[Question] Guidelines for concurrency check usage ?

Open sanghel-payoff opened this issue 4 years ago • 3 comments

ABP Commercial 5.0, Angular, EFCore with PGSQL

The official documentation is in a TODO state... https://docs.abp.io/en/abp/5.1/Concurrency-Check

Npgsql offers a "native" extensions for using a shadow property xmin as the concurrency token for EFCore ( see here )

Q1: Is the infrastructure around the IHasConcurrencyStamp interface aware of this Npgsql special case, or the "recommended" way for Abp is to use this interface only?

Q2: If using IHasConcurrencyStamp is the recommended way, is this the correct way to value it? Any suggestion for when / how to set it for an Entity (not an AggregateRoot )?

sanghel-payoff avatar Jan 20 '22 17:01 sanghel-payoff

ABP doesn't use Npgsql's special case, it uses EF Core's general rules. You can refer to this PR to learn how to use it.

https://github.com/abpframework/abp/pull/9838 https://github.com/abpframework/abp/pull/9838/commits/603f094b1e90d65cf999a1f9ecd5ba06636a555f

maliming avatar Jan 21 '22 05:01 maliming

@hikalkan The official documentation should at least illustrate some usage patterns...

sanghel-payoff avatar Jan 26 '22 17:01 sanghel-payoff

See https://github.com/abpframework/abp/pull/12026

maliming avatar Mar 28 '22 01:03 maliming