Exemple #1
0
        public void SendOrder(int orderId)
        {
            // Wait 5 sec and then tell user order is complete
            Task.Run(() => {
                // Record order in DB
                CosmosDbHelper.AddOrderData(orderId, Context.ConnectionId);

                Thread.Sleep(5000);
                Clients.Caller.broadcastMessage("System", "Order " + orderId + " is complete.");
            });
        }
Exemple #2
0
 protected void Application_Start(object sender, EventArgs e)
 {
     // This creates the DB and collection in cosmosdb
     // Normally you would do this ahead of time
     CosmosDbHelper.Init();
 }