Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //User tempUser = context.Users.Where(x => x.UserId == 1).FirstOrDefault();
- //User tempUser2 = context.Users.Where(x => x.UserName == "oskar").FirstOrDefault();
- //User tempUser3 = context.Users.Where(x => x.UserName == "nitinanand").FirstOrDefault();
- //User tempUser = new User { UserName = "nils", Email = "nils@nils.com", Password = "nils" };
- //User tempUser2 = new User { UserName = "simon", Email = "simon@simon.com", Password = "simon"};
- //User tempUser3 = new User { UserName = "harry", Email = "harry@harry.com", Password = "harry" };
- //context.Users.Add(tempUser);
- //context.Users.Add(tempUser2);
- //context.Users.Add(tempUser3);
- //context.SaveChanges();
- //List<Category> categories = new List<Category>();
- //Category cat1 = new Category { Name = "War", Creator = tempUser };
- //Category cat2 = new Category { Name = "Money", Creator = tempUser };
- //categories.Add(cat1);
- //categories.Add(cat2);
- //var cat3 = context.Categories.Where(x => x.Name == "Politics").FirstOrDefault();
- //var cat4 = context.Categories.Where(x => x.Name == "Others").FirstOrDefault();
- //context.Categories.AddRange(categories);
- //context.SaveChanges();
- //List<Article> articleList = new List<Article>
- //{
- // new Article {Heading="Conspiracy Files: Who shot down MH17?",
- // Author =tempUser2.UserId,
- // ImgAdress ="http://ichef-1.bbci.co.uk/news/976/cpsprodpb/3640/production/_89288831_wreckage.jpg",
- // Categories = new List<Category>{cat3},
- // Date = new DateTime(2016, 03, 30),
- // Text ="As the theory that MH17 was shot down by a plane not ground2air missile swept across the internet, Billy Six, a freelance journalistBerlin",
- // SourceAdress ="http://www.bbc.com/news/magazine-35706048" },
- // new Article {Heading="Giant Umbrella to Stop Global Warming!",
- // Author= tempUser3.UserId,
- // Categories = new List<Category> {cat4, cat1, cat2 },
- // Date= new DateTime(2015, 05, 12),
- // Text="Our rapidly warming world could cause serious problems for civilisation in the decades to come. But could a giantumbrella help cool down?",
- // ImgAdress="http://ichef.bbci.co.uk/wwfeatures/1600_640/images/live/p0/3s/57/p03s57zw.jpg",
- // SourceAdress="http://www.bbc.com/future/story/20160425-how-a-giant-space-umbrella-could-stop-global-warming"
- // },
- // new Article {Heading="”Game of thrones” Fuck'd Up på HBO – People Hates",
- // Author = tempUser3.UserId,
- // VideoAdress="http://tv.aftonbladet.se/abtv/articles/120169?service=embedded&autoplay=false",
- // Categories=new List<Category> {cat1 },
- // Date = new DateTime(2016,04,25),
- // Text="The cult fantasy drama Game of Thrones begins its much-anticipated sixth season next Sunday",
- // SourceAdress="http://www.theguardian.com/media/2016/apr/17/game-of-thrones-hbo-vinyl-netflix"
- // }
- //};
- //context.Articles.AddRange(articleList);
- //context.SaveChanges();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement