public LoadCommonResponse RetrieveAllPNDTLocation() { _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}"); try { var data = _webMasterService.GetAllPNDTLocation(); _logger.LogInformation($"Received PNDT Location Master data {data}"); return(data.Count == 0 ? new LoadCommonResponse { Status = "true", Message = "No record found", data = new List <LoadCommon>() } : new LoadCommonResponse { Status = "true", Message = string.Empty, data = data }); } catch (Exception e) { _logger.LogError($"Error in receiving pndt location data {e.StackTrace}"); return(new LoadCommonResponse { Status = "false", Message = e.Message, data = null }); } }