示例#1
0
        static void Main(string[] args)
        {
            if (args.Length < 3 || args.Any(p => p == "/?") || args.Any(p => p == "-?") || args.Any(p => p == "/help") || args.Any(p => p == "--help"))
            {
                Console.WriteLine("you need at least three args - targetDacPac (which will be created) sourceDacpac sourceDacpac");
                return;
            }

            var target  = args.First <string>();
            var sources = args.Skip(1).ToArray();

            var merger = new DacpacMerge(args[0], sources);

            merger.Merge();
        }
示例#2
0
        static void Main(string[] args)
        {
            int returnCode = 0;

            try
            {
                if (args.Length < 3 || args.Any(p => p == "/?") || args.Any(p => p == "-?") || args.Any(p => p == "/help") || args.Any(p => p == "--help"))
                {
                    Console.WriteLine("you need at least three args - targetDacPac (which will be created) sourceDacpac sourceDacpac");
                    returnCode = 1;
                }

                var stopwatch = new Stopwatch();

                stopwatch.Start();

                var target  = args.First <string>();
                var sources = args.Skip(1).ToArray();

                var merger = new DacpacMerge(args[0], sources);
                merger.Merge();

                stopwatch.Stop();

                Console.WriteLine("Completed merging {0} dacpacs in {1} seconds.", args.Length - 1, stopwatch.Elapsed.TotalSeconds);
#if DEBUG
                Console.ReadLine();
#endif
                Environment.Exit(returnCode);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);

#if DEBUG
                Console.ReadLine();
#endif
                Environment.Exit(e.HResult);
            }
        }