[HttpPost] // Create
        public async Task <IActionResult> Create(Category category)
        {
            _context.Categories.Add(category);
            await _context.SaveChangesAsync();

            return(CreatedAtAction(nameof(GetById), new { id = category.Id }, category));
        }
        [HttpPost] // Create
        public async Task <IActionResult> Create(Product product)
        {
            _context.Products.Add(product);
            await _context.SaveChangesAsync();

            return(CreatedAtAction(nameof(GetById), new { id = product.Id }, product));
        }