aboutsummaryrefslogtreecommitdiff
path: root/Database/Database.cs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-10 17:22:35 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-10 17:22:35 +0000
commit501ed87620504ec1e2b99f81651afcae61d577df (patch)
treed5e3c83a5bd3209b79acc002524c0186a60db254 /Database/Database.cs
parenta5956cd6d7d07c14a84ebc68d2f82b717f300e2e (diff)
downloadnewsaggregator-501ed87620504ec1e2b99f81651afcae61d577df.tar.gz
newsaggregator-501ed87620504ec1e2b99f81651afcae61d577df.tar.bz2
newsaggregator-501ed87620504ec1e2b99f81651afcae61d577df.zip
Changed return to 0 if duplicates written
Diffstat (limited to 'Database/Database.cs')
-rw-r--r--Database/Database.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Database/Database.cs b/Database/Database.cs
index d3ccb2e..6c3511c 100644
--- a/Database/Database.cs
+++ b/Database/Database.cs
@@ -28,7 +28,7 @@ namespace Database {
await Articles.AddRangeAsync(articles);
return await SaveChangesAsync();
} catch (Microsoft.EntityFrameworkCore.DbUpdateException) {
- return -1; // duplicate title id's
+ return 0; // duplicate title id's
}
}