public IActionResult Post([FromBody] Product product) { ProductBO productBO; ObjectResult response; try { _log.LogInformation($"Starting Post('{JsonConvert.SerializeObject(product, Formatting.None)}')"); productBO = new ProductBO(_loggerFactory, _config); product = productBO.Insert(product); response = Ok(product); _log.LogInformation($"Finishing Post"); } catch (Exception ex) { _log.LogError(ex.Message); response = StatusCode(500, ex.Message); } return(response); }