Exemple #1
0
        public LoadTestingCHCResponse GetTestingCHC(int riId)
        {
            _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}");
            try
            {
                var chc = _webMasterService.RetrieveTestingCHC(riId);

                _logger.LogInformation($"Received chc master data {chc}");
                return(chc.Count == 0 ?
                       new LoadTestingCHCResponse {
                    Status = "true", Message = "No record found", TestingCHC = new List <LoadCHCs>()
                }
                    : new LoadTestingCHCResponse {
                    Status = "true", Message = string.Empty, TestingCHC = chc
                });
            }
            catch (Exception e)
            {
                _logger.LogError($"Error in receiving chc data {e.StackTrace}");
                return(new LoadTestingCHCResponse {
                    Status = "false", Message = e.Message, TestingCHC = null
                });
            }
        }