private BlogListItemModel CreateBlogItemModel(Entries entry, string blogPageUrl) { using (var con = new DataConnection()) { var image = con.Get <IMediaFile>().FirstOrDefault(m => m.KeyPath == entry.Image); var model = new BlogListItemModel { Title = entry.Title, Url = BlogFacade.GetBlogUrl(entry, blogPageUrl), Tags = entry.Tags, TagsByType = BlogFacade.GetTagsByType(entry.Tags), ImageUrl = image != null?BlogFacade.GetFullPath(MediaUrls.BuildUrl(image)) : string.Empty }; return(model); } }