From 501ed87620504ec1e2b99f81651afcae61d577df Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 10 Feb 2019 17:22:35 +0000 Subject: Changed return to 0 if duplicates written --- Database/Database.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } } -- cgit v1.2.3-13-gbd6f