Updated transaction locks to be defered.

This commit is contained in:
Keivan Beigi
2014-11-24 12:00:19 -08:00
parent 06d8d1e2bb
commit af3c0de4d5
11 changed files with 39 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using Marr.Data;
@@ -145,7 +146,7 @@ namespace NzbDrone.Core.Datastore
{
using (var unitOfWork = new UnitOfWork(() => DataMapper))
{
unitOfWork.BeginTransaction();
unitOfWork.BeginTransaction(IsolationLevel.ReadCommitted);
foreach (var model in models)
{
@@ -160,7 +161,7 @@ namespace NzbDrone.Core.Datastore
{
using (var unitOfWork = new UnitOfWork(() => DataMapper))
{
unitOfWork.BeginTransaction();
unitOfWork.BeginTransaction(IsolationLevel.ReadCommitted);
foreach (var model in models)
{
@@ -203,7 +204,7 @@ namespace NzbDrone.Core.Datastore
{
using (var unitOfWork = new UnitOfWork(() => DataMapper))
{
unitOfWork.BeginTransaction();
unitOfWork.BeginTransaction(IsolationLevel.ReadCommitted);
foreach (var id in ids)
{