diff options
Diffstat (limited to 'Main')
-rw-r--r-- | Main/Program.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Main/Program.cs b/Main/Program.cs index d0ce984..0159873 100644 --- a/Main/Program.cs +++ b/Main/Program.cs @@ -27,10 +27,9 @@ namespace Main { Console.WriteLine(articles.Count);
using (var db = new DatabaseContext()) {
- await db.Articles.AddAsync(articles[0]);
+ articles.ForEach(async article => await db.Articles.AddAsync(article));
int records = await db.SaveChangesAsync();
Console.WriteLine($"Wrote {records} records!");
- Console.ReadKey();
}
}
}
|