Beispiel #1
0
        static void Main(string[] args)
        {
            StockRepository stockRepository = new StockRepository(
                Settings.Default.AzureCosmosDBEndpointUrl,
                Settings.Default.AzureCosmodBDPrimaryKey,
                Settings.Default.AzureCosmosDatabaseName);

            Task.WaitAll(stockRepository.EnsureCollection());

            Product[] products = GetDemoProducts();
            Task.WaitAll(stockRepository.AddEntities(products));
        }