Exemplo n.º 1
0
 private static void InitializeAppointments(SalonDbContext db)
 {
     if (db.Appointments.Count() != 0)
     {
         return;
     }
     db.Appointments.AddRange(Appointments);
     db.SaveChanges();
 }
Exemplo n.º 2
0
 private static void InitializeTreatmentTypes(SalonDbContext db)
 {
     if (db.TreatmentTypes.Count() != 0)
     {
         return;
     }
     db.TreatmentTypes.AddRange(TreatmentTypes);
     db.SaveChanges();
 }
Exemplo n.º 3
0
 private static void InitializeTechnicians(SalonDbContext db)
 {
     if (db.Technicians.Count() != 0)
     {
         return;
     }
     db.Technicians.AddRange(Technicians);
     db.SaveChanges();
 }
Exemplo n.º 4
0
 public static void Initialize(SalonDbContext db)
 {
     InitializeTreatmentTypes(db);
     InitializeTechnicianTypes(db);
     InitializeTreatments(db);
     InitializeTechnicians(db);
     InitializeClients(db);
     InitializeAppointments(db);
 }