Пример #1
0
 private static void InitializeAppointments(SalonDbContext db)
 {
     if (db.Appointments.Count() != 0)
     {
         return;
     }
     db.Appointments.AddRange(Appointments);
     db.SaveChanges();
 }
Пример #2
0
 private static void InitializeTreatmentTypes(SalonDbContext db)
 {
     if (db.TreatmentTypes.Count() != 0)
     {
         return;
     }
     db.TreatmentTypes.AddRange(TreatmentTypes);
     db.SaveChanges();
 }
Пример #3
0
 private static void InitializeTechnicians(SalonDbContext db)
 {
     if (db.Technicians.Count() != 0)
     {
         return;
     }
     db.Technicians.AddRange(Technicians);
     db.SaveChanges();
 }
Пример #4
0
 public static void Initialize(SalonDbContext db)
 {
     InitializeTreatmentTypes(db);
     InitializeTechnicianTypes(db);
     InitializeTreatments(db);
     InitializeTechnicians(db);
     InitializeClients(db);
     InitializeAppointments(db);
 }