public LoadCHCResponse GetCHC(int userId) { _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}"); try { var chc = _webMasterService.RetrieveCHC(userId); _logger.LogInformation($"Received chc master data {chc}"); return(chc.Count == 0 ? new LoadCHCResponse { Status = "true", Message = "No record found", CHC = new List <LoadCHCs>() } : new LoadCHCResponse { Status = "true", Message = string.Empty, CHC = chc }); } catch (Exception e) { _logger.LogError($"Error in receiving chc data {e.StackTrace}"); return(new LoadCHCResponse { Status = "false", Message = e.Message, CHC = null }); } }