示例#1
0
        public LoadILRResponse GetILRByRI(int riId)
        {
            _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}");
            try
            {
                var ilr = _webMasterService.RetrieveILR(riId);

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