Ejemplo n.º 1
0
        public StoresController(BitCoINCLLCContext context)
        {
            _context = context;

            if (_context.Stores.Count() == 0)
            {
                _context.Stores.Add(new Store()
                {
                    Id = 1, LocationNumber = 432, District = "NorthEast"
                });
                _context.Stores.Add(new Store()
                {
                    Id = 2, LocationNumber = 244, District = "Southwest"
                });
                _context.Stores.Add(new Store()
                {
                    Id = 3, LocationNumber = 743, District = "Pacific"
                });

                _context.SaveChanges();
            }
        }
Ejemplo n.º 2
0
        public AdminsController(BitCoINCLLCContext context)
        {
            _context = context;

            if (_context.Admins.Count() == 0)
            {
                _context.Admins.Add(new Admin()
                {
                    Id = 1, Name = "Harrison"
                });
                _context.Admins.Add(new Admin()
                {
                    Id = 2, Name = "Billy"
                });
                _context.Admins.Add(new Admin()
                {
                    Id = 3, Name = "Taylor"
                });

                _context.SaveChanges();
            }
        }
Ejemplo n.º 3
0
        public OrdersController(BitCoINCLLCContext context)
        {
            _context = context;

            if (_context.Orders.Count() == 0)
            {
                _context.Orders.Add(new Order()
                {
                    Id = 1, Products = "The Orange Attack, Ocean Blue", InvoiceNumber = 7483928
                });
                _context.Orders.Add(new Order()
                {
                    Id = 2, Products = "The Orange Attack, The Gold Rush", InvoiceNumber = 9040932
                });
                _context.Orders.Add(new Order()
                {
                    Id = 3, Products = "The Gold Rush, Ocean Blue", InvoiceNumber = 8765490
                });

                _context.SaveChanges();
            }
        }
Ejemplo n.º 4
0
        public CustomersController(BitCoINCLLCContext context)
        {
            _context = context;

            if (_context.Customers.Count() == 0)
            {
                _context.Customers.Add(new Customer()
                {
                    Id = 1, Name = "Walmart", IsBulk = true
                });
                _context.Customers.Add(new Customer()
                {
                    Id = 2, Name = "Bob's Liquor", IsBulk = false
                });
                _context.Customers.Add(new Customer()
                {
                    Id = 3, Name = "SexyFidgetySpinners.com", IsBulk = true
                });

                _context.SaveChanges();
            }
        }
Ejemplo n.º 5
0
        public SpinnersController(BitCoINCLLCContext context)
        {
            _context = context;

            if (_context.Spinners.Count() == 0)
            {
                _context.Spinners.Add(new Spinner()
                {
                    Id = 1, Name = "The Orange Attack", Color = "Blood Orange", Price = "$20.99"
                });
                _context.Spinners.Add(new Spinner()
                {
                    Id = 2, Name = "The Gold Rush", Color = "Gold", Price = "$21.99"
                });
                _context.Spinners.Add(new Spinner()
                {
                    Id = 3, Name = "Ocean Blue", Color = "Sky Blue", Price = "$15.99"
                });

                _context.SaveChanges();
            }
        }