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)); }
public Task Create(Guid productId, double Retail, double Cost, double Current) { var entity = new PriceDbModel(productId, Retail, Cost, Current); return(_priceRepository.Create(entity)); }