Browse Source

update extension impl

master
Savorboard 6 years ago
parent
commit
401cc6f099
1 changed files with 4 additions and 13 deletions
  1. +4
    -13
      src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs

+ 4
- 13
src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs View File

@@ -7,7 +7,9 @@ namespace DotNetCore.CAP
{
public class MySqlCapTransaction : CapTransactionBase
{
public MySqlCapTransaction(IDispatcher dispatcher) : base(dispatcher) { }
public MySqlCapTransaction(IDispatcher dispatcher) : base(dispatcher)
{
}

public override void Commit()
{
@@ -49,16 +51,6 @@ namespace DotNetCore.CAP

public static class CapTransactionExtensions
{
public static ICapTransaction Begin(this ICapTransaction transaction,
IDbTransaction dbTransaction, bool autoCommit = false)
{

transaction.DbTransaction = dbTransaction;
transaction.AutoCommit = autoCommit;

return transaction;
}

public static ICapTransaction Begin(this ICapTransaction transaction,
IDbContextTransaction dbTransaction, bool autoCommit = false)
{
@@ -69,5 +61,4 @@ namespace DotNetCore.CAP
return transaction;
}
}

}
}

Loading…
Cancel
Save