public async Task <IActionResult> CreatePrice([FromBody] PriceSaveResource priceResource)
        {
            var price = mapper.Map <PriceSaveResource, Price>(priceResource);

            repository.AddPrice(price);
            await unitOfWork.CompleteAsync();

            price = await repository.GetPrice(price.Id);

            var result = mapper.Map <Price, PriceSaveResource>(price);

            return(Ok(result));
        }
        public async Task <IActionResult> UpdatePrices(int id, [FromBody] PriceSaveResource saveResource)
        {
            var price = await repository.GetPrice(id);

            if (price == null)
            {
                return(NotFound());
            }

            mapper.Map <PriceSaveResource, Price>(saveResource, price);
            await unitOfWork.CompleteAsync();

            price = await repository.GetPrice(price.Id);

            var result = mapper.Map <Price, PriceSaveResource>(price);

            return(Ok(result));
        }