Example #1
0
        public static void Initialize(StockNotificationContext stockNotificationContext)
        {
            var listOfExcludedSellers = new List <tblExcludedSellers>();

            listOfExcludedSellers.Add(new tblExcludedSellersBuilder().WithUsername("bjorn").WithSellerId(7).Build());
            listOfExcludedSellers.Add(new tblExcludedSellersBuilder().WithUsername("bjorn").WithSellerId(8).Build());

            stockNotificationContext.tblExcludedSellers.AddRange(listOfExcludedSellers);
            stockNotificationContext.SaveChanges();
        }
        public static void Initialize(StockNotificationContext stockNotificationContext)
        {
            var listOfSellers = new List <tblSellers>();

            listOfSellers.Add(new tblSellersBuilder().WithId(1).WithName("Amazon").WithUrl("https://www.amazon.co.uk").Build());
            listOfSellers.Add(new tblSellersBuilder().WithId(2).WithName("Ebay").WithUrl("https://www.ebay.co.uk").Build());
            listOfSellers.Add(new tblSellersBuilder().WithId(3).WithName("Currys PC World").WithUrl("https://www.currys.co.uk").Build());
            listOfSellers.Add(new tblSellersBuilder().WithId(4).WithName("Argos").WithUrl("https://www.argos.co.uk").Build());
            listOfSellers.Add(new tblSellersBuilder().WithId(5).WithName("Smyths").WithUrl("https://www.smythstoys.com").Build());
            listOfSellers.Add(new tblSellersBuilder().WithId(6).WithName("Target").WithUrl("https://www.target.com").Build());
            listOfSellers.Add(new tblSellersBuilder().WithId(7).WithName("Best Buy").WithUrl("https://www.bestbuy.com").Build());
            listOfSellers.Add(new tblSellersBuilder().WithId(8).WithName("Walmart").WithUrl("https://www.walmart.com").Build());

            stockNotificationContext.tblSellers.AddRange(listOfSellers);
            stockNotificationContext.SaveChanges();
        }