public IActionResult Create([FromForm] Category category)
        {
            //Category category = new Category()
            //{
            //    CategoryName = name,
            //    Description = description
            //};

            category = _categoryOperations.Create(category);

            return((category != null) ? Content($"Entidad insertada {category.CategoryID}") : Content("No se pudo insertar la categoria"));
        }
Esempio n. 2
0
        public IActionResult AddCategory(Category category)
        {
            var response = _categoryOperations.Create(category);

            return(Ok(response));
        }