public static void ResetSequentialGuid(EntityMappingConstants entity, string key, Guid seed)
{
if (string.IsNullOrEmpty(key))
throw new Exception("Invalid key");
lock (_seqCacheLock)
{
var k = entity.ToString() + "|" + key;
if (!_sequentialIdGeneratorCache.ContainsKey(k))
_sequentialIdGeneratorCache.Add(k, new SequentialIdGenerator(seed));
else
_sequentialIdGeneratorCache[k].LastValue = seed;
}
}