Ejemplo n.º 1
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            //Database.SetInitializer(new DropCreateDatabaseAlways<CompanyContext>());
            _context = new CompanyContext();
            _customer = _context.Customers.First();
            Formulaire.DataContext = _customer;

            //throw new NotImplementedException("Voir énoncé");
        }
Ejemplo n.º 2
0
        public void InsertionFonctionnelle()
        {
            CompanyContext cpyCtx = new CompanyContext();
            Customer customer = new Customer(4500.75,"Rue de la Justice","Rue des francais","Chatelet","Belgique","*****@*****.**",0001,"Robert","6200","Gentil");

            Database.SetInitializer(new DropCreateDatabaseAlways<CompanyContext>());
            cpyCtx.Customers.Add(customer);
            cpyCtx.SaveChanges();
        }
Ejemplo n.º 3
0
        public void InsertionFonctionnelle()
        {
            CompanyContext CpyCtx = new CompanyContext();
            Customer customer = new Customer(100.2,"Rue de glimes,3","rue joephine rauscent", "Jodoigne", "Belgique", "*****@*****.**",1,"Ghislain","1370","A livrer");

            Database.SetInitializer(new DropCreateDatabaseAlways<CompanyContext>());
            CpyCtx.Customers.Add(customer);
            CpyCtx.SaveChanges();

            TestMethod2();
        }
Ejemplo n.º 4
0
 void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     _context = new CompanyContext();
     _customer = _context.Customers.First(); //Il va chercher le premier customer de la bd
     Formulaire.DataContext = _customer;
 }