private List <MigrationOperation> BuildShardingOperation(MigrationOperation sourceOperation)
        {
            //所有MigrationOperation定义
            //https://github.com/dotnet/efcore/tree/b970bf29a46521f40862a01db9e276e6448d3cb0/src/EFCore.Relational/Migrations/Operations
            //ColumnOperation仅替换Table
            //其余其余都是将Name和Table使用分表名替换

            List <MigrationOperation> resList = new List <MigrationOperation>();
            string absTableName = string.Empty;

            string name      = sourceOperation.GetPropertyValue("Name") as string;
            string tableName = sourceOperation.GetPropertyValue("Table") as string;
            string pattern   = string.Format("^({0})$|^({0}_.*?)$|^(.*?_{0}_.*?)$|^(.*?_{0})$", absTableName);

            Func <KeyValuePair <string, List <string> >, bool> where = x =>
                                                                       _existsShardingTables.Any(x => Regex.IsMatch(name, BuildPattern(x.Key)));

            if (!tableName.IsNullOrEmpty())
            {
                absTableName = tableName;
            }
            else if (!name.IsNullOrEmpty() && _existsShardingTables.Any(x => where (x)))
            {
                absTableName = _existsShardingTables.Where(x => where (x)).FirstOrDefault().Key;
            }

            //分表
            if (!absTableName.IsNullOrEmpty() && _existsShardingTables.ContainsKey(absTableName))
            {
                var shardings = _existsShardingTables[absTableName];
                shardings.ForEach(aSharding =>
                {
                    var clone = sourceOperation.DeepClone();
                    resList.Add(clone);
                    ReplaceName(clone, absTableName, aSharding);
                });
            }
            //不分表
            else
            {
                resList.Add(sourceOperation);
            }

            return(resList);

            string BuildPattern(string absTableName)
            {
                return(string.Format("^({0})$|^({0}_.*?)$|^(.*?_{0}_.*?)$|^(.*?_{0})$", absTableName));
            }
        }