コード例 #1
0
        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"));
            }
        }