Open Closed

Manually Generate Concurrency Stamp #5241


User avatar
0
jaykishan created
  • ABP Framework version: v7.2.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC): yes
  • DB: MySQL

I have successfully migrated my old framework to the abpframework.

I executed few mysql queries to dump data from old db to abp db and inserted properly.

I managed to generate the new guid using IGuidGenerator for the data that was dumped using the query, I did some tricks during dataseeding process, make list call and then hard delete the list data.

Finally looped the in-memory data and created Guid with IGuidGenerator and in-memory data to improve the performance as well.

I have issue with few tables with concurrencystamp. Please see the screenshot.

public class ClassName : FullAuditedAggregateRoot<Guid>, IMultiTenant

So it has implemented IHasConcurrencyStamp. I can generate random value but is there any existing abp method in c# to generate concurrencystamp?

In DB, ConcurrencyStamp is null


2 Answer(s)
  • User Avatar
    0
    Long.Nguyen created

    Hi,

    Currently, we just set it's value as:

    entity.ConcurrencyStamp = Guid.NewGuid().ToString("N");

    Regards, Long

  • User Avatar
    0
    jaykishan created

    Thank you so much for reply. It resolves my issue. :)

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11