private static void PopulateBlogsTable(Article article) { Blog blog = new Blog(); blog.Title = article.Title; blog.Slug = ScrubHtml(article.FullText).Cut(200) + "..."; blog.ImageURI = article.ImageURI; blog.UserName = "******" + article.ID; blog.FullArticleURL = "/Home/Artukul?id=" + article.ID; SqlFuDAL.PopulateBlogs(blog); }
private static void PopulateArticlesWithBlogs() { for (int i = 0; i < 5; i++) { Article article = new Article(); article.CreatedOn = DateTime.UtcNow; article.FullText = loremIpsum5Paragraphs[i]; article.ImageURI = "http://lorempixel.com/150/150/"; article.Title = "Lorem Ipsum Paragraph " + (i + 1); SqlFuDAL.PopulateArticles(article); PopulateBlogsTable(article); } }