예제 #1
0
        public void SetUP()
        {
            using (var context = new AdventureworksContext(options))
            {
                List <Product> customers = new List <Product>();

                customers.Add(new Product()
                {
                    ProductId = 123,
                    Name      = "Pants",
                    ListPrice = 12,
                    Weight    = 23
                });
                customers.Add(new Product()
                {
                    ProductId = 456,
                    Name      = "Pants",
                    ListPrice = 12,
                    Weight    = 23
                });
                customers.Add(new Product()
                {
                    ProductId = 789,
                    Name      = "DELETE",
                    ListPrice = 12,
                    Weight    = 23
                });
                context.AddRange(customers);
                context.SaveChanges();
            }
        }
        public void SetUP()
        {
            using (var context = new AdventureworksContext(options))
            {
                List <Customer> customers = new List <Customer>();

                customers.Add(new Customer()
                {
                    CustomerId = 888,
                    FirstName  = "Luis",
                    MiddleName = "Esteban",
                    LastName   = "Alvarez"
                });
                customers.Add(new Customer()
                {
                    CustomerId = 456,
                    FirstName  = "Marco",
                    MiddleName = "Antonio",
                    LastName   = "Alvarezq"
                });
                customers.Add(new Customer()
                {
                    CustomerId = 789,
                    FirstName  = "DELETE",
                    MiddleName = "DELETE",
                    LastName   = "DELETE"
                });
                context.AddRange(customers);
                context.SaveChanges();
            }
        }