public IList <AttractionType> GetAttractionTypes() { var x = _repository.GetAttractionTypes(); foreach (var attr in x) { if (null == attr.ImagePath) { attr.ImagePath = @""; } attr.ImagePath = ImageToBase64(attr.ImagePath); } return(x); }