Skip to content

Commit

Permalink
closes #199 - TeacherSeed - doplnit User.Lastname #199
Browse files Browse the repository at this point in the history
  • Loading branch information
Xopabyteh committed May 23, 2024
1 parent c395f3a commit 411af0b
Showing 1 changed file with 217 additions and 37 deletions.
254 changes: 217 additions & 37 deletions DataLayer/Seeds/Teachers2022/TeacherSeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,227 @@ public override void SeedData()
{
var teachers = new[]
{
new Teacher() { SeededEntityId = 5558550, User = new User() { Email = "[email protected]", Name = "Barbora Lacinová" } },
new Teacher() { SeededEntityId = 4854197, User = new User() { Email = "[email protected]", Name = "Helena Polláková" } },
new Teacher() { SeededEntityId = 2805686, User = new User() { Email = "[email protected]", Name = "David John Seddon" } },
new Teacher() { SeededEntityId = 10950419, User = new User() { Email = "[email protected]", Name = "Zdeněk Drozd" } },
new Teacher() { SeededEntityId = 4978114, User = new User() { Email = "[email protected]", Name = "Jaroslav Šebestík" } },
new Teacher() { SeededEntityId = 7314404, User = new User() { Email = "[email protected]", Name = "Michaela Makešová" } },
new Teacher() { SeededEntityId = 1021013, User = new User() { Email = "[email protected]", Name = "Robert Haken" } },
new Teacher() { SeededEntityId = 16438547, User = new User() { Email = "[email protected]", Name = "Stanislava Hrušková" } },
new Teacher() { SeededEntityId = 2724000, User = new User() { Email = "[email protected]", Name = "Ivo Šír" } },
new Teacher() { SeededEntityId = 8619441, User = new User() { Email = "[email protected]", Name = "Cyril Svoboda" } },
new Teacher() { SeededEntityId = 10546950, User = new User() { Email = "[email protected]", Name = "Renáta Sladká" } },
new Teacher() { SeededEntityId = 856000, User = new User() { Email = "[email protected]", Name = "James De Silva" } },
new Teacher() { SeededEntityId = 10659022, User = new User() { Email = "[email protected]", Name = "Jitka Procházková" } },
new Teacher() { SeededEntityId = 8258528, User = new User() { Email = "[email protected]", Name = "Kateřina Dojčiaková" } },
new Teacher() { SeededEntityId = 5906515, User = new User() { Email = "[email protected]", Name = "Kryštof Kučmáš" } },
new Teacher() { SeededEntityId = 872777, User = new User() { Email = "[email protected]", Name = "Martin Kalivoda" } },
new Teacher() { SeededEntityId = 13061828, User = new User() { Email = "[email protected]", Name = "Martin Komárek" } },
new Teacher() { SeededEntityId = 16120635, User = new User() { Email = "[email protected]", Name = "Adéla Smažíková" } },
new Teacher() { SeededEntityId = 2705278, User = new User() { Email = "[email protected]", Name = "Barbora Hudečková Herchlová" } },
new Teacher() { SeededEntityId = 7871725, User = new User() { Email = "[email protected]", Name = "Boris Jankovec" } },
new Teacher() { SeededEntityId = 3531037, User = new User() { Email = "[email protected]", Name = "Jelena Bedretdinovová" } },
new Teacher() { SeededEntityId = 4298674, User = new User() { Email = "[email protected]", Name = "Lenka Ulmanová" } },
new Teacher() { SeededEntityId = 10940690, User = new User() { Email = "[email protected]", Name = "Marie Veverová" } },
new Teacher() { SeededEntityId = 9712308, User = new User() { Email = "[email protected]", Name = "Martin Kulhánek" } },
new Teacher() { SeededEntityId = 1476149, User = new User() { Email = "[email protected]", Name = "Milan Hanzl" } },
new Teacher() { SeededEntityId = 2188808, User = new User() { Email = "[email protected]", Name = "Petr Kubačák" } },
new Teacher() { SeededEntityId = 4276982, User = new User() { Email = "[email protected]", Name = "Václav Brdek" } },
new Teacher() { SeededEntityId = 3853935, User = new User() { Email = "[email protected]", Name = "Věra Jurčáková" } },
new Teacher() { SeededEntityId = 6753631, User = new User() { Email = "[email protected]", Name = "Peter Benjamin Parker" } },
new Teacher() { SeededEntityId = 1213033, User = new User() { Email = "[email protected]", Name = "Jitka Hofmannová" } },
new Teacher() { SeededEntityId = 9398696, User = new User() { Email = "[email protected]", Name = "Rafik Bedretdinov" } },
new Teacher() { SeededEntityId = 13371611, User = new User() { Email = "[email protected]", Name = "Stanislav Hampl" } },
new Teacher() { SeededEntityId = 3930125, User = new User() { Email = "[email protected]", Name = "Dana Mandíková" } },
new Teacher() { SeededEntityId = 6273638, User = new User() { Email = "[email protected]", Name = "Kateřina Miloschewská" } },
new Teacher() { SeededEntityId = 13712422, User = new User() { Email = "[email protected]", Name = "Jana Sedláčková" } },
new Teacher() { SeededEntityId = 39839199, User = new User() { Email = "[email protected]", Name = "Martin Zimen" } },
new Teacher()
{
SeededEntityId = 5558550,
User = new User()
{Email = "[email protected]", Name = "Barbora Lacinová", Lastname = "Lacinová"}
},
new Teacher()
{
SeededEntityId = 4854197,
User = new User()
{Email = "[email protected]", Name = "Helena Polláková", Lastname = "Polláková"}
},
new Teacher()
{
SeededEntityId = 2805686,
User = new User()
{Email = "[email protected]", Name = "David John Seddon", Lastname = "Seddon"}
},
new Teacher()
{
SeededEntityId = 10950419,
User = new User()
{Email = "[email protected]", Name = "Zdeněk Drozd", Lastname = "Drozd"}
},
new Teacher()
{
SeededEntityId = 4978114,
User = new User()
{Email = "[email protected]", Name = "Jaroslav Šebestík", Lastname = "Šebestík"}
},
new Teacher()
{
SeededEntityId = 7314404,
User = new User()
{Email = "[email protected]", Name = "Michaela Makešová", Lastname = "Makešová"}
},
new Teacher()
{
SeededEntityId = 1021013,
User = new User()
{Email = "[email protected]", Name = "Robert Haken", Lastname = "Haken"}
},
new Teacher()
{
SeededEntityId = 16438547,
User = new User()
{Email = "[email protected]", Name = "Stanislava Hrušková", Lastname = "Hrušková"}
},
new Teacher()
{
SeededEntityId = 2724000,
User = new User()
{Email = "[email protected]", Name = "Ivo Šír", Lastname = "Šír"}
},
new Teacher()
{
SeededEntityId = 8619441,
User = new User()
{Email = "[email protected]", Name = "Cyril Svoboda", Lastname = "Svoboda"}
},
new Teacher()
{
SeededEntityId = 10546950,
User = new User()
{Email = "[email protected]", Name = "Renáta Sladká", Lastname = "Sladká"}
},
new Teacher()
{
SeededEntityId = 856000,
User = new User()
{Email = "[email protected]", Name = "James De Silva", Lastname = "De Silva"}
},
new Teacher()
{
SeededEntityId = 10659022,
User = new User()
{Email = "[email protected]", Name = "Jitka Procházková", Lastname = "Procházková"}
},
new Teacher()
{
SeededEntityId = 8258528,
User = new User()
{Email = "[email protected]", Name = "Kateřina Dojčiaková", Lastname = "Dojčiaková"}
},
new Teacher()
{
SeededEntityId = 5906515,
User = new User()
{Email = "[email protected]", Name = "Kryštof Kučmáš", Lastname = "Kučmáš"}
},
new Teacher()
{
SeededEntityId = 872777,
User = new User()
{Email = "[email protected]", Name = "Martin Kalivoda", Lastname = "Kalivoda"}
},
new Teacher()
{
SeededEntityId = 13061828,
User = new User()
{Email = "[email protected]", Name = "Martin Komárek", Lastname = "Komárek"}
},
new Teacher()
{
SeededEntityId = 16120635,
User = new User()
{Email = "[email protected]", Name = "Adéla Smažíková", Lastname = "Smažíková"}
},
new Teacher()
{
SeededEntityId = 2705278,
User = new User()
{Email = "[email protected]", Name = "Barbora Hudečková Herchlová", Lastname = "Hudečková"}
},
new Teacher()
{
SeededEntityId = 7871725,
User = new User()
{Email = "[email protected]", Name = "Boris Jankovec", Lastname = "Jankovec"}
},
new Teacher()
{
SeededEntityId = 3531037,
User = new User()
{Email = "[email protected]", Name = "Jelena Bedretdinovová", Lastname = "Bedretdinovová"}
},
new Teacher()
{
SeededEntityId = 4298674,
User = new User()
{Email = "[email protected]", Name = "Lenka Ulmanová", Lastname = "Ulmanová"}
},
new Teacher()
{
SeededEntityId = 10940690,
User = new User()
{Email = "[email protected]", Name = "Marie Veverová", Lastname = "Veverová"}
},
new Teacher()
{
SeededEntityId = 9712308,
User = new User()
{Email = "[email protected]", Name = "Martin Kulhánek", Lastname = "Kulhánek"}
},
new Teacher()
{
SeededEntityId = 1476149,
User = new User() {Email = "[email protected]", Name = "Milan Hanzl", Lastname = "Hanzl"}
},
new Teacher()
{
SeededEntityId = 2188808,
User = new User()
{Email = "[email protected]", Name = "Petr Kubačák", Lastname = "Kubačák"}
},
new Teacher()
{
SeededEntityId = 4276982,
User = new User()
{Email = "[email protected]", Name = "Václav Brdek", Lastname = "Brdek"}
},
new Teacher()
{
SeededEntityId = 3853935,
User = new User()
{Email = "[email protected]", Name = "Věra Jurčáková", Lastname = "Jurčáková"}
},
new Teacher()
{
SeededEntityId = 6753631,
User = new User()
{Email = "[email protected]", Name = "Peter Benjamin Parker", Lastname = "Parker"}
},
new Teacher()
{
SeededEntityId = 9398696,
User = new User()
{Email = "[email protected]", Name = "Rafik Bedretdinov", Lastname = "Bedretdinov"}
},
new Teacher()
{
SeededEntityId = 13371611,
User = new User()
{Email = "[email protected]", Name = "Stanislav Hampl", Lastname = "Hampl"}
},
new Teacher()
{
SeededEntityId = 3930125,
User = new User()
{Email = "[email protected]", Name = "Dana Mandíková", Lastname = "Mandíková"}
},
new Teacher()
{
SeededEntityId = 6273638,
User = new User()
{Email = "[email protected]", Name = "Kateřina Miloschewská", Lastname = "Miloschewska"}
},
new Teacher()
{
SeededEntityId = 13712422,
User = new User()
{Email = "[email protected]", Name = "Jana Sedláčková", Lastname = "Sedláčková"}
},
new Teacher()
{
SeededEntityId = 39839199,
User = new User()
{Email = "[email protected]", Name = "Martin Zimen", Lastname = "Zimen"}
},
new Teacher()
{
SeededEntityId = 1213033,
User = new User()
{ Email = "[email protected]", Name = "Jitka Hofmannová", Lastname = "Hofmannová"}
},

};

Seed(For(teachers).PairBy(teacher => teacher.SeededEntityId)
.AndFor(teacher => teacher.User, userSeed => userSeed.PairBy(u => u.Email))
.AfterSave(item => item.SeedEntity.User.TeacherId = item.PersistedEntity.Id)
);
}
}
}

0 comments on commit 411af0b

Please sign in to comment.