Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Duplicate record while running a plugin

$
0
0

Hi,

I have a plugin which executes on saving of a record of a custom entity. Problem is, when multiple users tries to create record, its assigning same number to the clients. I tried locking the create method with following code 

m.WaitOne();
try
{

//Logic for plugin

}
finally
{
 m.ReleaseMutex();
}

The problem with this is, when multiple requests are made, for some of them it throws SQL timeout exception.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>