Exemple #1
0
        static void Main(string[] args)
        {
            Console.Write("Enter db name : ");
            var db = Console.ReadLine();
            //CreateDatabase(db);
            int numOrders = 10;

            Stopwatch sw = new Stopwatch();

            sw.Start();
            var orders     = Order.MakeOrders(numOrders);
            var serialized = new string[numOrders];
            var essentdb   = new EsentDb(db);

            for (int i = 0; i < numOrders; i++)
            {
                essentdb.Store(orders[i].OrderId, orders[i]);
            }
            essentdb.Dispose();

            sw.Stop();
            Console.WriteLine("Time taken = " + sw.ElapsedMilliseconds);
            Console.ReadKey();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.Write("Enter db name : ");
              var db = Console.ReadLine();
              //CreateDatabase(db);
              int numOrders = 10;

              Stopwatch sw = new Stopwatch();
              sw.Start();
              var orders = Order.MakeOrders(numOrders);
              var serialized = new string[numOrders];
              var essentdb = new EsentDb(db);
              for (int i = 0; i < numOrders; i++)
              {
            essentdb.Store(orders[i].OrderId, orders[i]);
              }
              essentdb.Dispose();

              sw.Stop();
              Console.WriteLine("Time taken = " + sw.ElapsedMilliseconds);
              Console.ReadKey();
        }