示例#1
0
        static void Main(string[] args)
        {
            //Events Handler Definitions starting with version 2.7
            SqlDatabaseExternalEventHandler.ExecScalarUDFEvent       += SqlDatabaseEventHandler_ExecScalarUDFEvent;
            SqlDatabaseExternalEventHandler.InsertStatementEvent     += SqlDatabaseExternalEventHandler_InsertStatementEvent;
            SqlDatabaseExternalEventHandler.UpdateStatementEvent     += SqlDatabaseExternalEventHandler_UpdateStatementEvent;
            SqlDatabaseExternalEventHandler.DeleteStatementEvent     += SqlDatabaseExternalEventHandler_DeleteStatementEvent;
            SqlDatabaseExternalEventHandler.BeginTransactionEvent    += SqlDatabaseExternalEventHandler_BeginTransactionEvent;
            SqlDatabaseExternalEventHandler.CommitTransactionEvent   += SqlDatabaseExternalEventHandler_CommitTransactionEvent;
            SqlDatabaseExternalEventHandler.RollbackTransactionEvent += SqlDatabaseExternalEventHandler_RollbackTransactionEvent;


            MetaCollections();
            Console.WriteLine("**** Example and tests for wwww.sqldatabase.net ****\n");
            Console.WriteLine();

            Console.WriteLine("* Example for key value like behavior to store raw bytes and .net objects");
            KeyValueStoreLikeBehavior();
            Console.WriteLine();

            Console.WriteLine("* KeyValueStoreLikeBehavior example completed. Press Enter key to start example of how to add images/files.");
            Console.ReadLine();

            AddImage();
            Console.WriteLine();
            Console.WriteLine("* Image / File example completed. Press Enter key to start Import Export CSV example.");
            Console.WriteLine();
            Console.ReadLine();

            ImportExportCSV();
            Console.WriteLine();
            Console.WriteLine("* Import Export CSV example completed. Press Enter key to start ORM client example.");
            Console.ReadLine();
            Console.WriteLine("Starting ORM Based Examples...");
            Console.WriteLine();
            ORMClientExamples.StartExamples();


            Console.WriteLine("* ORM Client examples completed. Press Enter key to start SQL based examples.");
            Console.WriteLine();
            Console.ReadLine();
            Console.WriteLine("Starting SQL Based Examples...");
            Console.WriteLine();
            SQLExamples.StartExamples();


            Console.WriteLine("* ORM Client and SQL examples completed. press Enter key to see meta data.");
            Console.ReadLine();
            MetaCollections();
            Console.WriteLine("* All Examples Executed, press enter key to exit.");
            Console.ReadLine();
            Environment.Exit(0);
        }
        static void Main(string[] args)
        {
            Console.WriteLine("**** Example and tests for wwww.sqldatabase.net ****\n");
            Console.WriteLine();

            Console.WriteLine("* Example for key value like behavior to store raw bytes and .net objects");
            KeyValueStoreLikeBehavior();
            Console.WriteLine();

            Console.WriteLine("* KeyValueStoreLikeBehavior example completed. Press Enter key to start example of how to add images/files.");
            Console.ReadLine();

            AddImage();
            Console.WriteLine();
            Console.WriteLine("* Image / File example completed. Press Enter key to start Import Export CSV example.");
            Console.WriteLine();
            Console.ReadLine();

            ImportExportCSV();
            Console.WriteLine();
            Console.WriteLine("* Import Export CSV example completed. Press Enter key to start ORM client example.");
            Console.ReadLine();
            Console.WriteLine("Starting ORM Based Examples...");
            Console.WriteLine();
            ORMClientExamples.StartExamples();


            Console.WriteLine("* ORM Client examples completed. Press Enter key to start SQL based examples.");
            Console.WriteLine();
            Console.ReadLine();
            Console.WriteLine("Starting SQL Based Examples...");
            Console.WriteLine();
            SQLExamples.StartExamples();


            Console.WriteLine("* ORM Client and SQL examples completed. press Enter key to see meta data.");
            Console.ReadLine();
            MetaCollections();
            Console.WriteLine("* All Examples Executed, press enter key to exit.");
            Console.ReadLine();
            Environment.Exit(0);
        }