public async Task <IActionResult> GetBanners(string Ipcountry, string CountryTimezone) { try { var _getAllBanners = await _BannerService.GetAllBanner(Ipcountry, CountryTimezone); foreach (var returnlist in _getAllBanners) { strImagePath = _configuration["FilePath:ImagePath"] + "BannerImages/"; string strServerURL = _configuration["FilePath:ServerURL"] + "BannerImages/"; if (System.IO.File.Exists(strImagePath + returnlist.EnglishImage)) { returnlist.EnglishImage = strServerURL + returnlist.EnglishImage; } else { returnlist.EnglishImage = ""; } if (System.IO.File.Exists(strImagePath + returnlist.ArabicImage)) { returnlist.ArabicImage = strServerURL + returnlist.ArabicImage; } else { returnlist.ArabicImage = ""; } } return(Ok(_getAllBanners)); } catch (Exception err) { return(BadRequest(new GenericResultDto <string> { Result = err.Message })); } }