Ejemplo n.º 1
0
 public void AddToTZ_FAHRZEUGMARKETest()
 {
     MDP_Projekt.Model.Context target = new MDP_Projekt.Model.Context(); // TODO: Initialize to an appropriate value
     MDP_Projekt.Model.TZ_FAHRZEUGMARKE tZ_FAHRZEUGMARKE = null; // TODO: Initialize to an appropriate value
     target.AddToTZ_FAHRZEUGMARKE(tZ_FAHRZEUGMARKE);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Ejemplo n.º 2
0
        private void testButton_Click(object sender, RoutedEventArgs e)
        {
            testButton.Content = "hallo Welt";

            // Beispiel Code
            using (Model.Context context = new Model.Context())
            {
                // Create example 1
                context.AddToT_NUTZER(new Model.T_NUTZER() { NUT_NAME = "Selim", NUT_ORT = "Zug", NUT_PLZ = 6300 });
                context.SaveChanges();

                // Create example 2
                Model.TZ_FAHRZEUGMARKE marketyp = new Model.TZ_FAHRZEUGMARKE();
                marketyp.TR_FAHRZEUGTYP = new Model.TR_FAHRZEUGTYP() { FZT_BEZEICHNUNG = "Piaggio" };
                marketyp.FZM_BEZEICHNUNG = "MSX 323 Turbo";
                context.AddToTZ_FAHRZEUGMARKE(marketyp);
                context.SaveChanges();

                // Update example
                Model.T_NUTZER nutzer = context.T_NUTZER.Where(q => q.NUT_ID == 1).First();
                nutzer.NUT_NAME = "Noëlle";
                context.SaveChanges();

                // Delete example
                context.T_NUTZER.DeleteObject(context.T_NUTZER.Where(q => q.NUT_ID == 5).First());
                context.SaveChanges();
            }
        }