Permalink
Browse files

IDbTransaction による Query メソッドなどの呼び出し機能を追記

  • Loading branch information...
1 parent b2c9b20 commit 70fc2bee544d6101de177b923e740a5fbcef349c Takaaki Suzuki committed Jan 22, 2016
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.md
View
@@ -52,6 +52,21 @@ using (var transaction = connection.StartTransaction()) //--- begin transaction
//--- commit or rollback on transaction.Dispose()
```
+In addition, You can call `Query` / `Execute` (etc.) methods directly same as `IDbConnection`. Following code is same meaning.
+
+```cs
+using (var connection = DbProvider.CreateConnection(DbKind.SqlServer, "ConnectionString"))
+using (var transaction = connection.StartTransaction())
+{
+ //--- for IDbConnection
+ connection.Execute("insert into ...", model, transaction);
+
+ //--- for IDbTransaction (a little short)
+ transaction.Execute("insert into ...", model);
+}
+```
+
+
## O/R mapping information

0 comments on commit 70fc2be

Please sign in to comment.