public async Task <IActionResult> AddProduct([FromRoute] int id, [FromRoute] int idp)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var catalog = await catalogRepository.AddCatalogProduct(id, idp);

            if (catalog == null)
            {
                return(BadRequest());
            }

            CatalogDTO dto = new CatalogDTO();

            dto.CatalogId          = catalog.CatalogId;
            dto.Date               = catalog.Date;
            dto.CatalogDescription = catalog.CatalogDescription;
            dto.CatalogName        = catalog.CatalogName;
            dto.products           = new List <ProductDTO>();
            foreach (CatalogProduct cp in catalog.CatalogProducts)
            {
                ProductDTO pdto = productToDTO(cp.Product);
                dto.products.Add(pdto);
            }

            return(Ok(dto));
        }