|
|
|
@ -14,6 +14,7 @@ using (var context = new LibraryContext())
|
|
|
|
|
Console.WriteLine("Insertion\n");
|
|
|
|
|
|
|
|
|
|
books = await myStub.booksStub();
|
|
|
|
|
persons = await myStub.personsStub();
|
|
|
|
|
|
|
|
|
|
// Ajoute chaque person à la base de données de manière asynchrone
|
|
|
|
|
foreach (var person in persons)
|
|
|
|
@ -21,6 +22,7 @@ using (var context = new LibraryContext())
|
|
|
|
|
await context.PersonsSet.AddAsync(person);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await context.SaveChangesAsync();
|
|
|
|
|
|
|
|
|
|
// Ajoute chaque livre à la base de données de manière asynchrone
|
|
|
|
|
foreach (var book in books)
|
|
|
|
|