From e4f9b4c71efa2e635959a70f6af47291a2aab83e Mon Sep 17 00:00:00 2001 From: tidusjar Date: Mon, 8 Aug 2016 11:21:50 +0100 Subject: [PATCH] Added logging --- PlexRequests.Store/Repository/BaseGenericRepository.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PlexRequests.Store/Repository/BaseGenericRepository.cs b/PlexRequests.Store/Repository/BaseGenericRepository.cs index e814875fa..2e54b0366 100644 --- a/PlexRequests.Store/Repository/BaseGenericRepository.cs +++ b/PlexRequests.Store/Repository/BaseGenericRepository.cs @@ -292,14 +292,20 @@ namespace PlexRequests.Store.Repository db.Open(); using (var tran = db.BeginTransaction()) { + Log.Trace("Starting Transaction"); var result = enumerable.Sum(e => db.Insert(e)); var done = result == enumerable.Length; + Log.Trace($"Total Result: {done}"); + Log.Trace($"db result: {result}"); + Log.Trace($"totalitems result: {enumerable.Length}"); if (done) { + Log.Trace("Committed the tran"); tran.Commit(); return true; } + Log.Trace("Rolling back the tran"); tran.Rollback(); return false;