From 5432a563e537f130d60ca0474edefbfd9a4a94a4 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 8 Feb 2019 12:02:16 +0000 Subject: Making proof of concept using console alone --- Main/Program.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Main') 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(); } } } -- cgit v1.2.3-13-gbd6f