public ActionResult <Customer> GetCustomerById(int id) { var customer = _repo.FindById(id); if (customer.Result == null) { _logger.LogError($"Customer with id: {id}, hasn't been found in db."); return(NotFound($"Customer with id: {id} not found")); } _logger.LogInformation($"Returned customer with id: {id}"); return(Ok(customer.Result)); }