Пример #1
0
        public SneakerController(MasterContext context)
        {
            _context = context;

            if (_context.Sneakers.Count() == 0)
            {
                Sneaker sneaker1 = new Sneaker("Nike", "12", "Jordans", "Red and white", "1984", "Mint");
                sneaker1.SneakerPics.Add(new SneakerImage("https://images.solecollector.com/complex/image/upload/rg1zccq86lstafmqms44.jpg"));
                sneaker1.SneakerPics.Add(new SneakerImage("http://www.rantsports.com/clubhouse/files/2015/11/airjordan1cropped.jpg"));
                sneaker1.Description = "These Red and white Jordans have been thoroughly taken care of. Only worn 2 times with minimal wear and tear. Super minty and ready for you to flex with!";
                _context.Sneakers.Add(sneaker1);

                Sneaker sneaker2 = new Sneaker("Reebok", "11.5", "Pump", "White", "v1", "Good");
                sneaker2.SneakerPics.Add(new SneakerImage("https://www.sneakerfiles.com/wp-content/uploads/2014/06/reebok-pump-omni-lite-og-white-black-orange-releasing-friday.jpg"));
                sneaker2.SneakerPics.Add(new SneakerImage("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQolnSYHlx02KXxXjZP6JhLMLB2KLP0_mKvL9oFz9MFxeYDxKc"));
                sneaker2.Description = "New with box: A brand-new, unused, and unworn item (including handmade items) in the original packaging (such as the original box or bag) and/or with the original tags attached";
                _context.Sneakers.Add(sneaker2);

                Sneaker sneaker3 = new Sneaker("Nike", "10.5", "Platinum Pinnacle", "Platinum and White", "Air 6", "Excellent");
                sneaker3.SneakerPics.Add(new SneakerImage("https://dtpmhvbsmffsz.cloudfront.net/posts/2017/10/30/59f763c6f092820c850b2302/m_59f764277fab3a7ad80b1365.jpg"));
                sneaker3.Description = "Had these sneakers for years just sitting in the box in my closet. Barely worn. When i did wear them though, people were breaking their necks. Get at these before they're gone.";
                _context.Sneakers.Add(sneaker3);

                Sneaker sneaker4 = new Sneaker("Nike", "8", "Jordan 11 Heiress", "Black, white and gold", "Stringray", "Good");
                sneaker4.SneakerPics.Add(new SneakerImage("https://di2ponv0v5otw.cloudfront.net/posts/2018/04/03/5ac3aeae3afbbdea3eed8b5e/m_5ac3aebb61ca10e245d1344b.jpg"));
                sneaker4.Description = "My chick barely wore these shoes. The right shoe has a minor scuff on the sole, but other than that they are pristine. Make sure your chick is lookin as fly as you with the Jordan 11 Heiress'.";
                _context.Sneakers.Add(sneaker4);

                Sneaker sneaker5 = new Sneaker("Adidas", "11.5", "NMD Trail", "Black and white", "Pharrell William Human Race", "Excellent");
                sneaker5.SneakerPics.Add(new SneakerImage("https://3.kixify.com/sites/default/files/imagecache/product_full/product/2018/02/14/p_21728621_111082291_1616551.jpg"));
                sneaker5.Description = "These are brand spankin new never worn Pharrell's. Box has minor damage, but thats it. Wish I could keep these but my loss is your gain! Don't sleep on these.";
                _context.Sneakers.Add(sneaker5);

                Sneaker sneaker6 = new Sneaker("Adidas", "9", "NMD R1 PK NYC", "Orange, black and white", "Red Apple", "Excellent");
                sneaker6.SneakerPics.Add(new SneakerImage("https://cdn.kixify.com/sites/default/files/imagecache/product_full/product/2017/05/27/p_15413191_80658581_6596836.jpg"));
                sneaker6.Description = "Fresh set of NMD's that has never been worn. Joey Bada$$ helped make these sweet ass NYC inspired shoes. Been sitting under my bed since I got them so they're waiting to be rocked. Get at me with any questions.";
                _context.Sneakers.Add(sneaker6);

                Sneaker sneaker7 = new Sneaker("Nike", "10", "Air Max", "Gold, black, red and white", "270 Gold", "Excellent");
                sneaker7.SneakerPics.Add(new SneakerImage("https://2.kixify.com/sites/default/files/imagecache/product_full/product/2018/03/20/p_22207726_111768176_6943451.jpg"));
                sneaker7.Description = "Super hot fire 270 Gold's. Never worn, but have been sitting out of the box for a couple weeks. In need of cash or I wouldn't be getting rid of these.";
                _context.Sneakers.Add(sneaker7);

                Sneaker sneaker8 = new Sneaker("Saucony", "8.5", "Bodega x Saucony", "Blue and white", "Elite Shadow 5000", "Good");
                sneaker8.SneakerPics.Add(new SneakerImage("https://5.kixify.com/sites/default/files/imagecache/product_full/product/2017/06/03/p_15605076_81452676_3611916.jpg"));
                sneaker8.Description = "Got these as a gift from an ex. Worn a few times, but kept them super clean. Bodega collabed on these so they are pretty lit. Get at 'em before you get got.";
                _context.Sneakers.Add(sneaker8);

                Sneaker sneaker9 = new Sneaker("LA Gear", "9.5", "Catapult", "White", "Karl Malone 1991", "Good");
                sneaker9.SneakerPics.Add(new SneakerImage("http://images.complex.com/complex/image/upload/q_70/dd5a6szdy4tscev88un7.jpg"));
                sneaker9.Description = "Got these as a gift from back in the day. Barely wore them and kept them clean. Enjoy this sneaker from the old school.";
                _context.Sneakers.Add(sneaker9);

                _context.SaveChanges();
            }
        }
Пример #2
0
        public LogInSessionController(MasterContext context)
        {
            _context = context;

            if (_context.LoggedInUserId.Count() == 0)
            {
                // _context.LoggedInUserId.Add(new LogInSession(1));

                _context.SaveChanges();
            }
        }
Пример #3
0
        public UserController(MasterContext context)
        {
            _context = context;

            if (_context.Users.Count() == 0)
            {
                _context.Users.Add(new User("Andrew", "*****@*****.**", "abc123", "3 Bay Meadows Avenue", "", "Huntington Beach", "CA", 92647, "USA", "http://nflshop.frgimages.com/FFImage/thumb.aspx?i=/productImages%2F_633000%2Fff_633362_full.jpg&w=600"));
                _context.Users.Add(new User("Daniel", "*****@*****.**", "abc123", "669 Fairfield St.", "", "Santa Ana", "CA", 92707, "USA", "https://cdn.bleacherreport.net/images/team_logos/328x328/detroit_lions.png"));
                _context.Users.Add(new User("Eric", "*****@*****.**", "abc123", "5432 Belle Ave", "", "Cypress", "CA", 90630, "USA", "https://cconnect.s3.amazonaws.com/wp-content/uploads/2014/10/Los-Angeles-Kings-2014-Stanley-Cup-Ring.jpg"));
                _context.Users.Add(new User("Lewis", "*****@*****.**", "abc123", "573 Market Lane", "", "Anaheim", "CA", 92805, "USA", "https://i.pinimg.com/736x/5e/60/0e/5e600e5c89a24460ad6b70cfe7e96564.jpg"));

                _context.SaveChanges();
            }
        }
Пример #4
0
        public BidController(MasterContext context)
        {
            _context = context;

            if (_context.Bids.Count() == 0)
            {
                _context.Bids.Add(new Bid(1, 2, 510, DateTime.Parse("2018-04-01 12:00:00")));
                _context.Bids.Add(new Bid(1, 3, 530, DateTime.Parse("2018-04-01 12:30:00")));
                _context.Bids.Add(new Bid(2, 3, 50, DateTime.Parse("2018-04-03 14:24:00")));
                _context.Bids.Add(new Bid(2, 1, 65, DateTime.Parse("2018-04-03 14:44:00")));
                _context.Bids.Add(new Bid(5, 2, 201, DateTime.Parse("2018-04-04 12:14:00")));

                _context.SaveChanges();
            }
        }
Пример #5
0
        public RatingController(MasterContext context)
        {
            _context = context;

            if (_context.Ratings.Count() == 0)
            {
                _context.Ratings.Add(new Rating(DateTime.Parse("2018-04-01 12:30:00"), 100, 1, 2));
                _context.Ratings.Add(new Rating(DateTime.Parse("2018-04-02 12:30:00"), 90, 1, 3));
                _context.Ratings.Add(new Rating(DateTime.Parse("2018-04-03 12:30:00"), 80, 1, 4));
                _context.Ratings.Add(new Rating(DateTime.Parse("2018-04-01 12:30:00"), 100, 2, 1));
                _context.Ratings.Add(new Rating(DateTime.Parse("2018-04-02 12:30:00"), 90, 2, 3));
                _context.Ratings.Add(new Rating(DateTime.Parse("2018-04-03 12:30:00"), 80, 2, 4));

                _context.SaveChanges();
            }
        }
Пример #6
0
        public AuctionController(MasterContext context)
        {
            _context = context;

            if (_context.Auctions.Count() == 0)
            {
                Auction auction1 = new Auction(1, 1, DateTime.Parse("2018-04-01 12:00:00"), DateTime.Parse("2018-04-06 14:46:20"), 199.99, 500);
                auction1.WinnerId = 1;
                _context.Auctions.Add(auction1);
                // _context.Auctions.Add(new Auction(1, 1, DateTime.Parse("2018-04-01 12:00:00"), DateTime.Parse("2018-04-07 14:00:00"), 49.99, 500));

                Auction auction2 = new Auction(2, 2, DateTime.Parse("2018-04-02 15:30:00"), DateTime.Parse("2018-04-10 16:00:00"), 24.99, 0);
                auction2.WinnerId = 1;
                _context.Auctions.Add(auction2);
                // _context.Auctions.Add(new Auction(2, 2, DateTime.Parse("2018-04-02 15:30:00"), DateTime.Parse("2018-04-10 16:00:00"), 24.99, 0));

                Auction auction3 = new Auction(3, 1, DateTime.Parse("2018-03-29 11:30:00"), DateTime.Parse("2018-04-05 11:30:00"), 150, 250);
                // auction3.WinnerId = 3;
                _context.Auctions.Add(auction3);
                // _context.Auctions.Add(new Auction(3, 1, DateTime.Parse("2018-03-29 11:30:00"), DateTime.Parse("2018-04-05 11:30:00"), 150, 250));

                Auction auction4 = new Auction(4, 1, DateTime.Parse("2018-03-29 12:30:00"), DateTime.Parse("2018-04-07 14:10:00"), 500, 1000);
                // auction4.WinnerId = 4;
                _context.Auctions.Add(auction4);
                // _context.Auctions.Add(new Auction(4, 1, DateTime.Parse("2018-03-29 12:30:00"), DateTime.Parse("2018-04-05 12:00:00"), 500, 1000));

                Auction auction5 = new Auction(5, 4, DateTime.Parse("2018-03-30 15:30:00"), DateTime.Parse("2018-04-06 15:00:00"), 100, 200);
                // auction5.WinnerId = 1;
                _context.Auctions.Add(auction5);
                // _context.Auctions.Add(new Auction(5, 4, DateTime.Parse("2018-03-30 15:30:00"), DateTime.Parse("2018-04-06 15:00:00"), 100, 200));

                Auction auction6 = new Auction(6, 2, DateTime.Parse("2018-04-01 19:30:00"), DateTime.Parse("2018-04-07 19:00:00"), 100, 0);
                auction6.WinnerId = 4;
                _context.Auctions.Add(auction6);
                // _context.Auctions.Add(new Auction(6, 2, DateTime.Parse("2018-04-01 19:30:00"), DateTime.Parse("2018-04-07 19:00:00"), 100, 0));

                Auction auction7 = new Auction(7, 3, DateTime.Parse("2018-04-02 18:00:00"), DateTime.Parse("2018-04-06 18:00:00"), 75, 0);
                auction7.WinnerId = 2;
                _context.Auctions.Add(auction7);
                // _context.Auctions.Add(new Auction(7, 3, DateTime.Parse("2018-04-02 18:00:00"), DateTime.Parse("2018-04-06 18:00:00"), 75, 0));

                _context.SaveChanges();
            }
        }