Beispiel #1
0
        private void CreateCurrentProjectPrices()
        {
            CurrentProductPrice currentProductPrice = new CurrentProductPrice();
            ProductPrice        productPrice        = new ProductPrice()
            {
                ProductId = 2, CreatedOn = DateTime.UtcNow, Price = 120000, CurrentProductPrice = currentProductPrice
            };

            _productPriceService.SetProductPrice(productPrice);

            CurrentProductPrice currentProductPrice2 = new CurrentProductPrice();
            ProductPrice        productPrice2        = new ProductPrice()
            {
                ProductId = 2, CreatedOn = DateTime.UtcNow, Price = 150000, CurrentProductPrice = currentProductPrice2
            };

            _productPriceService.SetProductPrice(productPrice2);

            CurrentProductPrice currentProductPrice3 = new CurrentProductPrice();
            ProductPrice        productPrice3        = new ProductPrice()
            {
                ProductId = 1, CreatedOn = DateTime.UtcNow, Price = 15000, CurrentProductPrice = currentProductPrice3
            };

            _productPriceService.SetProductPrice(productPrice3);
        }
Beispiel #2
0
        private void CreateProductPrices()
        {
            IList <ProductPrice> productPrices = new List <ProductPrice>()
            {
                new ProductPrice()
                {
                    ProductId           = 1,
                    Price               = 15000,
                    CreatedOn           = DateTime.UtcNow,
                    CurrentProductPrice = new CurrentProductPrice()
                },
                new ProductPrice()
                {
                    ProductId           = 2,
                    Price               = 150000,
                    CreatedOn           = DateTime.UtcNow,
                    CurrentProductPrice = new CurrentProductPrice()
                },
                new ProductPrice()
                {
                    ProductId           = 3,
                    Price               = 450000,
                    CreatedOn           = DateTime.UtcNow,
                    CurrentProductPrice = new CurrentProductPrice()
                },
            };

            foreach (ProductPrice productPrice in productPrices)
            {
                _productPriceService.SetProductPrice(productPrice);
            }
        }