|
@@ -1,6 +1,7 @@ |
|
|
using System.Data; |
|
|
using System.Data; |
|
|
using System.Diagnostics; |
|
|
using System.Diagnostics; |
|
|
using Microsoft.EntityFrameworkCore.Storage; |
|
|
using Microsoft.EntityFrameworkCore.Storage; |
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace |
|
|
// ReSharper disable once CheckNamespace |
|
|
namespace DotNetCore.CAP |
|
|
namespace DotNetCore.CAP |
|
@@ -60,5 +61,13 @@ namespace DotNetCore.CAP |
|
|
|
|
|
|
|
|
return transaction; |
|
|
return transaction; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static IDbContextTransaction BeginAndJoinToTransaction(this DatabaseFacade database, |
|
|
|
|
|
ICapPublisher publisher, bool autoCommit = false) |
|
|
|
|
|
{ |
|
|
|
|
|
var trans = database.BeginTransaction(); |
|
|
|
|
|
var capTrans = publisher.Transaction.Begin(trans); |
|
|
|
|
|
return new CapEFDbTransaction(capTrans); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |