diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-08 12:02:16 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-08 12:02:16 +0000 |
commit | 5432a563e537f130d60ca0474edefbfd9a4a94a4 (patch) | |
tree | 337ad82535afa59e2fb931f9f3b7665592e15c2b /Main | |
parent | b11f73195a760d023a6f2619e14f4aa0463473a8 (diff) | |
download | newsaggregator-5432a563e537f130d60ca0474edefbfd9a4a94a4.tar.gz newsaggregator-5432a563e537f130d60ca0474edefbfd9a4a94a4.tar.bz2 newsaggregator-5432a563e537f130d60ca0474edefbfd9a4a94a4.zip |
Making proof of concept using console alone
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();
}
}
}
|