From 32248c00470ba81ae037318969304384dd17bf3a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 10 Feb 2019 17:46:24 +0000 Subject: Changed method to not return records counted - useless metric --- Database/Database.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Database') 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
Articles { get; set; } public virtual DbSet Configs { get; set; } - public async Task InsertArticles(IEnumerable
articles) { + public async Task InsertArticles(IEnumerable
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) { -- cgit v1.2.3-13-gbd6f