public IActionResult UpdateCategory(Category category)
        {
            using var context = new ProjectContext();
            var updatedCategory = context.Find <Category>(category.Id);

            if (updatedCategory == null)
            {
                return(NotFound());
            }
            updatedCategory.Name = category.Name;
            context.Update(updatedCategory);
            context.SaveChanges();
            return(NoContent());
        }