Hi, when I do auto number generation in plugin, I use "lock (SyncLock)" to handle the concurrency, but it looks like it doesn't work very well, I still get duplicated numbers sometimes.
private void RegNumber(Entity entity, IOrganizationService service)
{
lock (SyncLock)
{
if (entity != null)
{
// read counter
// update counter
}
}
}
*This post is locked for comments
I have the same question (0)