예제 #1
0
 private static void InitializeParticipantsOfTraining(SportsClubDbContext db)
 {
     if (db.ParticipantsOfTraining.Count() != 0)
     {
         return;
     }
     db.ParticipantsOfTraining.AddRange(Participants);
     db.SaveChanges();
 }
예제 #2
0
 private static void InitializeTimetableEntries(SportsClubDbContext db)
 {
     if (db.TimetableEntries.Count() != 0)
     {
         return;
     }
     db.TimetableEntries.AddRange(TimetableEntries);
     db.SaveChanges();
 }
예제 #3
0
 private static void InitializeLocations(SportsClubDbContext db)
 {
     if (db.Locations.Count() != 0)
     {
         return;
     }
     db.Locations.AddRange(Locations);
     db.SaveChanges();
 }
예제 #4
0
 private static void InitializeTrainings(SportsClubDbContext db)
 {
     if (db.Trainings.Count() != 0)
     {
         return;
     }
     db.Trainings.AddRange(Trainings);
     db.SaveChanges();
 }
예제 #5
0
 private static void InitializeCoaches(SportsClubDbContext db)
 {
     if (db.Coaches.Count() != 0)
     {
         return;
     }
     db.Coaches.AddRange(Coaches);
     db.SaveChanges();
 }