Ejemplo n.º 1
0
        public void InsertionFonctionnelle()
        {
            Database.SetInitializer(new DropCreateDatabaseAlways<CompanyContext>());

            CompanyContext context = new CompanyContext();
            Customer customer = new Customer()
            {
                AdresseLine1 = "Rue Mionvaux, 48",
                AccountBalance = 5000.5,
                City = "Marloie",
                Country = "Belgium",
                EMail = "*****@*****.**",
                Name = "Renard",
                PostCode = "6900",
                Remark = "test"
            };

            context.Customers.Add(customer);
            context.SaveChanges();
            DBIsNotEmpty();
        }
Ejemplo n.º 2
0
 void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     _context = new CompanyContext();
     _customer = _context.Customers.First();
     Formulaire.DataContext = _customer;
 }