|
10 | 10 |
|
11 | 11 | public partial class AdoAdapter : IAdapterWithTransactions |
12 | 12 | { |
13 | | - public IAdapterTransaction BeginTransaction(IsolationLevel isolationLevel) |
| 13 | + public IAdapterTransaction BeginTransaction(IsolationLevel isolationLevel = IsolationLevel.Unspecified) |
14 | 14 | { |
15 | 15 | IDbConnection connection = CreateConnection(); |
16 | 16 | connection.OpenIfClosed(); |
17 | 17 | IDbTransaction transaction = connection.BeginTransaction(isolationLevel); |
18 | 18 | return new AdoAdapterTransaction(transaction, _sharedConnection != null); |
19 | 19 | } |
20 | 20 |
|
21 | | - public IAdapterTransaction BeginTransaction(IsolationLevel isolationLevel, string name) |
| 21 | + public IAdapterTransaction BeginTransaction(string name, IsolationLevel isolationLevel = IsolationLevel.Unspecified) |
22 | 22 | { |
23 | 23 | IDbConnection connection = CreateConnection(); |
24 | 24 | connection.OpenIfClosed(); |
@@ -71,25 +71,25 @@ public int UpdateMany(string tableName, IList<IDictionary<string, object>> dataL |
71 | 71 | ((AdoAdapterTransaction)adapterTransaction).DbTransaction); |
72 | 72 | } |
73 | 73 |
|
74 | | - public IAdapterTransaction BeginTransaction() |
75 | | - { |
76 | | - IDbConnection connection = CreateConnection(); |
77 | | - connection.OpenIfClosed(); |
78 | | - IDbTransaction transaction = connection.BeginTransaction(); |
79 | | - return new AdoAdapterTransaction(transaction, _sharedConnection != null); |
80 | | - } |
81 | | - |
82 | | - public IAdapterTransaction BeginTransaction(string name) |
83 | | - { |
84 | | - IDbConnection connection = CreateConnection(); |
85 | | - connection.OpenIfClosed(); |
86 | | - var sqlConnection = connection as SqlConnection; |
87 | | - IDbTransaction transaction = sqlConnection != null |
88 | | - ? sqlConnection.BeginTransaction(name) |
89 | | - : connection.BeginTransaction(); |
90 | | - |
91 | | - return new AdoAdapterTransaction(transaction, name, _sharedConnection != null); |
92 | | - } |
| 74 | + //public IAdapterTransaction BeginTransaction() |
| 75 | + //{ |
| 76 | + // IDbConnection connection = CreateConnection(); |
| 77 | + // connection.OpenIfClosed(); |
| 78 | + // IDbTransaction transaction = connection.BeginTransaction(); |
| 79 | + // return new AdoAdapterTransaction(transaction, _sharedConnection != null); |
| 80 | + //} |
| 81 | + |
| 82 | + //public IAdapterTransaction BeginTransaction(string name) |
| 83 | + //{ |
| 84 | + // IDbConnection connection = CreateConnection(); |
| 85 | + // connection.OpenIfClosed(); |
| 86 | + // var sqlConnection = connection as SqlConnection; |
| 87 | + // IDbTransaction transaction = sqlConnection != null |
| 88 | + // ? sqlConnection.BeginTransaction(name) |
| 89 | + // : connection.BeginTransaction(); |
| 90 | + |
| 91 | + // return new AdoAdapterTransaction(transaction, name, _sharedConnection != null); |
| 92 | + //} |
93 | 93 |
|
94 | 94 | public IDictionary<string,object> Get(string tableName, IAdapterTransaction transaction, params object[] parameterValues) |
95 | 95 | { |
|
0 commit comments