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