private static string NewNumber(INumberedEntity entity, NumberedEntityOption option, IDbContext dbContext)
        {
            var key = CreateEntityKey(entity, option.Fields, dbContext);

            dbContext.AcquireDistributedLock(key);

            var number = option.Start.ToString(CultureInfo.InvariantCulture);

            var numberedEntity = dbContext.Set <NumberedEntity>().AsNoTracking().FirstOrDefault(a => a.EntityName == key);

            if (numberedEntity == null)
            {
                dbContext.ExecuteSqlRawCommand(
                    "INSERT INTO [dbo].[NumberedEntity]([EntityName], [NextValue]) VALUES(@p0,@p1)",
                    key,
                    option.Start + option.IncrementBy);
            }
            else
            {
                number = numberedEntity.NextValue.ToString(CultureInfo.InvariantCulture);
                dbContext.ExecuteSqlRawCommand(
                    "UPDATE [dbo].[NumberedEntity] SET [NextValue] = @p0 WHERE [Id] = @p1 ",
                    numberedEntity.NextValue + option.IncrementBy, numberedEntity.Id);
            }

            if (!string.IsNullOrEmpty(option.Prefix))
            {
                number = option.Prefix + number;
            }

            return(number);
        }