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); } }
public static string GetPublicUrl(this Entries entry) { return(GetPagePublicUrl(entry.PageId) + BlogFacade.GetBlogUrl(entry.Date, entry.Title, entry.PageId)); }
public static string GetPublicUrl(this Entries entry) { return(BlogFacade.GetBlogUrl(entry)); }