コード例 #1
0
        public async Task <IActionResult> CreatePrice(PriceCreationDto dto)
        {
            var newPrice = new PriceCreationDto
            {
                NominalPrice       = dto.NominalPrice,
                PromotionalPrice   = dto.PromotionalPrice,
                DiscountPercentage = dto.DiscountPercentage
            };

            await _priceRepository.Create(newPrice);

            return(Ok(dto));
        }
コード例 #2
0
        public Task Create(Guid productId, double Retail, double Cost, double Current)
        {
            var entity = new PriceDbModel(productId, Retail, Cost, Current);

            return(_priceRepository.Create(entity));
        }