Beispiel #1
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new ExamenDbContext2(serviceProvider.GetRequiredService <DbContextOptions <ExamenDbContext2> >()))
            {
                // Look for any movies.
                if (context.Persons.Any())
                {
                    return;   // DB has been seeded
                }

                context.Persons.AddRange(
                    new Person
                {
                    Name        = "Szabi",
                    Surname     = "Iamandi",
                    PhoneNumber = "0748105660",
                    Email       = "*****@*****.**",
                },

                    new Person
                {
                    Name        = "Karina",
                    Surname     = "Iamandi",
                    PhoneNumber = "0747036039",
                    Email       = "*****@*****.**",
                },

                    new Person
                {
                    Name        = "Stefi",
                    Surname     = "Iamandi",
                    PhoneNumber = "0740159322",
                    Email       = "*****@*****.**",
                }


                    );
                context.SaveChanges();
            }
        }
 public EquipmentsController(ExamenDbContext2 context)
 {
     _context = context;
 }
Beispiel #3
0
 public InspectionPlansController(ExamenDbContext2 context)
 {
     _context = context;
 }
Beispiel #4
0
 public PeopleController(ExamenDbContext2 context)
 {
     _context = context;
 }
Beispiel #5
0
 public CalibrationsController(ExamenDbContext2 context)
 {
     _context = context;
 }