-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Labels
Description
I have an api that bulk updates but when there are multiple requests to the api i got an error that the table already exist.
It boils down to DateTime.Now.Ticks being identical in temp table name for concurrent requests/bulk updates.
I created a custom IQueryProvider by copying SqlQueryProvider and change line 86 as below and now the same test works.
from:
var tempTableName = "temp_" + tableName + "_" + DateTime.Now.Ticks;
to:
var tempTableName = "temp_" + tableName + "_" + Guid.NewGuid().ToString("N");