コード例 #1
0
        private MongoDB.Document CreateDocument(ProductSales productSales)
        {
            var document = new MongoDB.Document();
            document.Add("product-id", productSales.ProductId);
            document.Add("product-name", productSales.ProductName);
            document.Add("vendor-name", productSales.VendorName);
            document.Add("total-quantity-sold", productSales.TotalQuantitySold);
            document.Add("total-incomes", productSales.TotalIncome);

            return document;
        }