Esempio n. 1
0
        public UserController(ShopMeister_Context context)
        {
            _context = context;

            if (_context.User.Count() == 0)
            {
                _context.User.Add(new User {
                    Id = 1
                });
                _context.SaveChanges();
            }
        }
        public ProductController(ShopMeister_Context context)
        {
            _context = context;

            if (_context.Product.Count() == 0)
            {
                _context.Product.Add(new Product {
                    Id = 1
                });
                _context.SaveChanges();
            }
        }