merge
This commit is contained in:
@@ -868,6 +868,20 @@ public sealed class WmsService
|
||||
entity.GetType().Name, entity.Id, version);
|
||||
}
|
||||
|
||||
private static bool IsUniqueConstraintViolation(DbUpdateException ex)
|
||||
{
|
||||
for (Exception? e = ex; e != null; e = e.InnerException)
|
||||
{
|
||||
var msg = e.Message;
|
||||
if (msg.Contains("UNIQUE constraint failed", StringComparison.OrdinalIgnoreCase)
|
||||
|| msg.Contains("unique index", StringComparison.OrdinalIgnoreCase)
|
||||
|| msg.Contains("duplicate key", StringComparison.OrdinalIgnoreCase))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void EnsureUnlocked(EntityBase entity)
|
||||
{
|
||||
if (entity.IsLock)
|
||||
|
||||
Reference in New Issue
Block a user