Exemplo n.º 1
0
        static async Task Main()
        {
            var mig = new Migrator();

#if DEBUG
            await mig.Migrate(new Argument { Name = "gather", Index = 12 });
#else
            await mig.RunLambda();
#endif
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            var it = new Migrator();

            it.Migrate(new Argument {
                Index = 0, Name = "environments"
            }).GetAwaiter().GetResult();
            it.Migrate(new Argument {
                Index = 0, Name = "products"
            }).GetAwaiter().GetResult();
            it.Migrate(new Argument {
                Index = 0, Name = "functions"
            }).GetAwaiter().GetResult();

            var empPages = it.Migrate(new Argument {
                Index = 0, Name = "employeepages"
            }).GetAwaiter().GetResult();
            var empRange = Enumerable.Range(0, empPages).ToArray();

            foreach (var empPage in empRange)
            {
                it.Migrate(new Argument {
                    Index = empPage, Name = "employees"
                }).GetAwaiter().GetResult();
            }


            var nodePages = it.Migrate(new Argument {
                Index = 0, Name = "nodepages"
            }).GetAwaiter().GetResult();
            var nodeRange = Enumerable.Range(0, nodePages).ToArray();

            foreach (var nodePage in nodeRange)
            {
                it.Migrate(new Argument {
                    Index = nodePage, Name = "nodes"
                }).GetAwaiter().GetResult();
            }
        }