Ejemplo n.º 1
0
        public override void Up()
        {
            Models.AuraltaClothingDbContext dbContext = new Models.AuraltaClothingDbContext();

            foreach (Models.Product product in dbContext.Products)
            {
                if (product.ProductId == 350)
                {
                    product.PriceUSD = 57.99;
                }
                else if (product.Category == Enums.ProductCategory.Hoodie)
                {
                    product.PriceUSD = 49.99;
                }
                else if (product.Category == Enums.ProductCategory.TShirt)
                {
                    product.PriceUSD = 23.99;
                }
                else if (product.Category == Enums.ProductCategory.LongSleeve)
                {
                    product.PriceUSD = 29.99;
                }
                else if (product.Category == Enums.ProductCategory.PocketTShirt)
                {
                    product.PriceUSD = 27.99;
                }


                //dbContext.Products.AddOrUpdate(product);
            }


            dbContext.SaveChanges();
        }
Ejemplo n.º 2
0
        public override void Up()
        {
            Models.AuraltaClothingDbContext dbContext = new Models.AuraltaClothingDbContext();

            foreach (Models.Product product in dbContext.Products)
            {
                if (product.ProductId == 350)
                {
                    product.Price    = 64.99;
                    product.PriceUSD = 49.99;
                }
            }


            dbContext.SaveChanges();
        }
Ejemplo n.º 3
0
        public override void Up()
        {
            Models.AuraltaClothingDbContext dbContext = new Models.AuraltaClothingDbContext();

            foreach (Models.Product product in dbContext.Products)
            {
                if (product.ProductId == 350)
                {
                    product.PriceUSD = 64.99;
                }
                else if (product.Category == Enums.ProductCategory.Hoodie)
                {
                    product.Price    = 49.99;
                    product.PriceUSD = 39.99;
                }
            }


            dbContext.SaveChanges();
        }