diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-10 17:46:24 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-10 17:46:24 +0000 |
commit | 32248c00470ba81ae037318969304384dd17bf3a (patch) | |
tree | 1856e066673392b9aaaa12b1234c86cdd88d5446 | |
parent | 6ca611ea71f7201dd9f5c2a685e5d5ad16e62ca1 (diff) | |
download | newsaggregator-32248c00470ba81ae037318969304384dd17bf3a.tar.gz newsaggregator-32248c00470ba81ae037318969304384dd17bf3a.tar.bz2 newsaggregator-32248c00470ba81ae037318969304384dd17bf3a.zip |
Changed method to not return records counted - useless metric
-rw-r--r-- | Database/Database.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Database/Database.cs b/Database/Database.cs index 2e362af..d2e7e32 100644 --- a/Database/Database.cs +++ b/Database/Database.cs @@ -23,15 +23,15 @@ namespace Database { public virtual DbSet<Article> Articles { get; set; } public virtual DbSet<Config> Configs { get; set; } - public async Task<int> InsertArticles(IEnumerable<Article> articles) { + public async Task InsertArticles(IEnumerable<Article> articles) { foreach (Article article in articles) { try { await Articles.AddAsync(article); + await SaveChangesAsync(); } catch (Microsoft.EntityFrameworkCore.DbUpdateException) { continue; } } - return await SaveChangesAsync(); } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { |