Ejemplo n.º 1
0
        public IActionResult CreateLink([FromQuery] int orderId, [FromQuery] int productId, [FromQuery] int count)
        {
            var link = _linksRepository.GetLinkByIds(orderId, productId);

            if (link is null)
            {
                return(BadRequest());
            }
            _linksRepository.CreateLink(orderId, productId, count);
            return(Ok());
        }