aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-10 17:22:48 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-10 17:22:48 +0000
commit7e517f6cc063ae8e25e9025cdbd75984f17bcbd7 (patch)
treef28ccfd24b277e4613fce98b45333dcb5716d073
parent501ed87620504ec1e2b99f81651afcae61d577df (diff)
downloadnewsaggregator-7e517f6cc063ae8e25e9025cdbd75984f17bcbd7.tar.gz
newsaggregator-7e517f6cc063ae8e25e9025cdbd75984f17bcbd7.tar.bz2
newsaggregator-7e517f6cc063ae8e25e9025cdbd75984f17bcbd7.zip
Made interface print out number of articles written
-rw-r--r--Main/Program.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Main/Program.cs b/Main/Program.cs
index a96762c..cb5bbff 100644
--- a/Main/Program.cs
+++ b/Main/Program.cs
@@ -24,10 +24,10 @@ namespace Main {
await Download.DownloadXML("http://feeds.bbci.co.uk/news/rss.xml")
};
List<Article> articles = ParserService.ParseMultiple(xmls, configs).ToList();
- Console.WriteLine("Wrote");
using (var db = new DatabaseContext()) {
- await db.InsertArticles(articles);
+ int records = await db.InsertArticles(articles);
+ Console.WriteLine($"{records} written to database");
}
}
}