示例#1
0
        public LoadMolecularResultResponse GetMolecularLResult()
        {
            _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}");
            try
            {
                var molecularResult = _webMasterService.RetrieveMolecularResult();

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