public bool Add(Product product) { return(_producRepository.Add(product)); }
public IActionResult Post([FromBody] Models.Product value) { Product result = _repository.Add(value); return(CreatedAtAction(nameof(GetById), new { Id = result.Id }, value));//en el post es recomendable devolver 201 }