public void CateInsert() { Assert.AreNotEqual(false, function.Post(new CategoryNew { name = "Công nghệ" })); }
public IActionResult Post([FromBody] CategoryNew item) { if (item == null) { return(NotFound()); } else { try { if (catefunction.Post(item)) { return(Ok()); } else { return(NotFound()); } } catch (Exception) { return(NotFound()); } } }