public IActionResult Delete(int id) { ProdutoBO produtoBO; ObjectResult response; try { _log.LogInformation($"Starting Delete( {id} )"); produtoBO = new ProdutoBO(_loggerFactory, _config); produtoBO.Delete(id); response = Ok(string.Empty); _log.LogInformation($"Finishing Delete( {id} )"); } catch (Exception ex) { _log.LogError(ex.Message); response = StatusCode(500, ex.Message); } return(response); }