Exemplo n.º 1
0
 public BlogEdit(string[] tags, Blog blog)
 {
     BlogTitle  = blog.BlogTitle;
     Content    = blog.Content;
     ImagePath  = blog.ImagePath;
     CategoryID = blog.CategoryID;
     IsLocalImg = blog.IsLocalImg;
     if (tags != null && tags.Length != 0)
     {
         BlogTags = string.Join(", ", tags);
     }
     BlogLinks = BlogHelper.GetBlogLink(blog.Links);
     Option    = blog.option;
 }
Exemplo n.º 2
0
 public static CarouselDisplay FromBlog(IUrlHelper url, Blog b)
 {
     return(new CarouselDisplay {
         BannerPath = BlogHelper.firstImgPath(b), Title = b.BlogTitle, Url = url.Action("Details", "Blog", new { id = b.BlogID })
     });
 }