public async Task <ActionResult <Customer> > GetCustomer(int id) { try { var result = await _customerRepo.FindByID(id); if (result == null) { return(NotFound($"Customer with ID = {id} not found !")); } return(result); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError)); throw; } }