private string GetImageSurveyUrl(int hotelId) { string imageUrl = Constant.ImageDefault; var image = PhotoList.FirstOrDefault(x => x.HotelId == hotelId && x.ImageTypeId > 3 && x.IsActive.HasValue && x.IsActive.Value); if (image != null) { imageUrl = image.Url; } return(imageUrl); }
private string GetHotelImageUrl(int hotelId) { string imageUrl = Constant.ImageDefault; var image = PhotoList.FirstOrDefault(x => x.HotelId == hotelId && x.ImageTypeId > 3 && x.IsActive.HasValue && x.IsActive.Value); if (image != null) { imageUrl = image.Url; } try { return(string.Format("{0}", new Uri(new Uri(AppConfiguration.CdnImageUrlDefault), imageUrl).AbsoluteUri)); } catch (Exception) { return(imageUrl); } }