public ActionResult GetAllCustomers() { try { _logger.Log(LogLevel.Information, "GET:All Customer details API Invoked."); return(Ok(_customerRepo.GetAllMockData().ToList())); } catch (Exception) { _logger.Log(LogLevel.Information, "GET:All Customer details API failed."); return(StatusCode(StatusCodes.Status500InternalServerError, "Error retrieving data")); } }