/// <summary>
        /// Does it.
        /// </summary>
        /// <param name="args">The arguments.</param>
        /// <returns></returns>
        public static async Task DoIt(string[] args)
        {
            try
            {
                // Make sure connection is always closed in order to close and release
                // server connection into the pool
                using (AceQLConnection theConnection = await ConnectionBuilderAsync().ConfigureAwait(false))
                {
                    SqlServerStoredProcedureTest myRemoteConnection = new SqlServerStoredProcedureTest(
                        theConnection);
                    AceQLConsole.WriteLine("Connection created....");

                    await myRemoteConnection.CallStoredProcedure().ConfigureAwait(false);

                    await theConnection.CloseAsync();
                }

                AceQLConsole.WriteLine();
                AceQLConsole.WriteLine("Press enter to close....");
                Console.ReadLine();
            }
            catch (Exception exception)
            {
                AceQLConsole.WriteLine(exception.ToString());
                AceQLConsole.WriteLine(exception.StackTrace);
                AceQLConsole.WriteLine("Press enter to close...");
                Console.ReadLine();
            }
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            int mainToLaunch = 6;

            if (mainToLaunch == 1)
            {
                AceQLTest.TheMain(args);
            }
            else if (mainToLaunch == 2)
            {
                AceQLTestColumnAsKeyName.TheMain(args);
            }
            else if (mainToLaunch == 3)
            {
                JsonTest.TheMain(args);
            }
            else if (mainToLaunch == 4)
            {
                MySqlStoredProcedureTest.TheMain(args);
            }
            else if (mainToLaunch == 5)
            {
                SqlServerStoredProcedureTest.TheMain(args);
            }
            else if (mainToLaunch == 6)
            {
                AceQLTest.TheMain(args);
                AceQLTestMetadata.TheMain();
            }
            else if (mainToLaunch == 7)
            {
                AceQLTestSessionId.TheMain();
                AceQLTestMetadata.TheMain();
            }
        }