Пример #1
0
        static void Main(string[] args)
        {
            var p                  = new Params(args);
            var tableName          = p.Get("table name", "-t");
            var idColumnName       = p.Get("id column name", "-i");
            var parentIdColumnName = p.Get("parent id column name", "-p");

            File.WriteAllText("out.sql", MigrationFactory.CreateScript(tableName, idColumnName, parentIdColumnName).ToString());
        }
Пример #2
0
        protected async Task <LRTest> Test(string tree)
        {
            var tableName = CreateTableName();
            await CreateTable.New("[%_Node_%]", SqlStuff.Escape(tableName)).ExecuteAsync(_connection);

            await Arrange(tree, SqlStuff.Escape(tableName), _connection);

            await MigrationFactory.CreateScript(tableName, "Id", "Parent_Id").ExecuteAsync(_connection);

            return(new LRTest(tableName, tree, _connection));
        }