public IActionResult AddProductType([FromBody] ProductType productType) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(new JsonResult(_productTypeRepository.AddProductType(productType))); }
public void AddProductType(String productTypeName) { _repository.AddProductType(productTypeName); }