提交 bb3052fa 编写于 作者: M mgravell

remove SqlTransaction references

上级 4a364589
...@@ -4,17 +4,14 @@ ...@@ -4,17 +4,14 @@
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Reflection.Emit;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data; using System.Data;
using System.Reflection;
using Microsoft.SqlServer.Server;
using System.Dynamic; using System.Dynamic;
using System.Collections; using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
namespace Dapper namespace Dapper
{ {
...@@ -137,7 +134,7 @@ public bool Equals(Identity other) ...@@ -137,7 +134,7 @@ public bool Equals(Identity other)
/// Execute parameterized SQL /// Execute parameterized SQL
/// </summary> /// </summary>
/// <returns>Number of rows affected</returns> /// <returns>Number of rows affected</returns>
public static int ExecuteMapperCommand(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null) public static int ExecuteMapperCommand(this IDbConnection cnn, string sql, object param = null, IDbTransaction transaction = null)
{ {
return ExecuteCommand(cnn, transaction, sql, GetParamInfo(param)); return ExecuteCommand(cnn, transaction, sql, GetParamInfo(param));
} }
...@@ -150,7 +147,7 @@ static class DynamicStub ...@@ -150,7 +147,7 @@ static class DynamicStub
/// <summary> /// <summary>
/// Enumerates the query, keeping the reader open after it is called. Use when iterating through huge result sets . You should usually use ExecuteMapperQuery instead. /// Enumerates the query, keeping the reader open after it is called. Use when iterating through huge result sets . You should usually use ExecuteMapperQuery instead.
/// </summary> /// </summary>
public static IEnumerable<T> EnumerateMapperQuery<T>(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null) public static IEnumerable<T> EnumerateMapperQuery<T>(this IDbConnection cnn, string sql, object param = null, IDbTransaction transaction = null)
{ {
var identity = new Identity(sql, cnn, typeof(T)); var identity = new Identity(sql, cnn, typeof(T));
...@@ -167,7 +164,7 @@ public static IEnumerable<T> EnumerateMapperQuery<T>(this IDbConnection cnn, str ...@@ -167,7 +164,7 @@ public static IEnumerable<T> EnumerateMapperQuery<T>(this IDbConnection cnn, str
/// <summary> /// <summary>
/// Enumerates the query, keeping the reader open after it is called. Use when iterating through huge result sets. You should usually use ExecuteMapperQuery instead /// Enumerates the query, keeping the reader open after it is called. Use when iterating through huge result sets. You should usually use ExecuteMapperQuery instead
/// </summary> /// </summary>
public static IEnumerable<dynamic> EnumerateMapperQuery(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null) public static IEnumerable<dynamic> EnumerateMapperQuery(this IDbConnection cnn, string sql, object param = null, IDbTransaction transaction = null)
{ {
var identity = new Identity(sql, cnn, DynamicStub.Type); var identity = new Identity(sql, cnn, DynamicStub.Type);
...@@ -184,7 +181,7 @@ public static IEnumerable<dynamic> EnumerateMapperQuery(this IDbConnection cnn, ...@@ -184,7 +181,7 @@ public static IEnumerable<dynamic> EnumerateMapperQuery(this IDbConnection cnn,
/// <summary> /// <summary>
/// Return a list of dynamic objects, reader is closed after the call /// Return a list of dynamic objects, reader is closed after the call
/// </summary> /// </summary>
public static List<dynamic> ExecuteMapperQuery(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null) public static List<dynamic> ExecuteMapperQuery(this IDbConnection cnn, string sql, object param = null, IDbTransaction transaction = null)
{ {
var identity = new Identity(sql, cnn, DynamicStub.Type); var identity = new Identity(sql, cnn, DynamicStub.Type);
var list = new List<dynamic>(); var list = new List<dynamic>();
...@@ -203,7 +200,7 @@ public static List<dynamic> ExecuteMapperQuery(this IDbConnection cnn, string sq ...@@ -203,7 +200,7 @@ public static List<dynamic> ExecuteMapperQuery(this IDbConnection cnn, string sq
/// <summary> /// <summary>
/// Return a typed list of objects, reader is closed after the call /// Return a typed list of objects, reader is closed after the call
/// </summary> /// </summary>
public static List<T> ExecuteMapperQuery<T>(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null) public static List<T> ExecuteMapperQuery<T>(this IDbConnection cnn, string sql, object param = null, IDbTransaction transaction = null)
{ {
var identity = new Identity(sql, cnn, typeof(T)); var identity = new Identity(sql, cnn, typeof(T));
var rval = new List<T>(); var rval = new List<T>();
......
using System; 
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SqlMapper.Linq2Sql namespace SqlMapper.Linq2Sql
{ {
public partial class Post public partial class Post
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Data.SqlClient;
using BLToolkit.Data;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.SqlServer;
using SqlMapper.Linq2Sql;
using System.Data.Linq; using System.Data.Linq;
using System.Data.SqlClient;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using BLToolkit.Data;
using Dapper;
using Massive; using Massive;
using SqlMapper.Linq2Sql;
using SqlMapper.NHibernate; using SqlMapper.NHibernate;
using Dapper;
namespace SqlMapper namespace SqlMapper
{ {
......
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Data.Metadata.Edm;
using System.Reflection; using System.Reflection;
using System.Data.EntityClient;
using System.Data.Linq;
namespace SqlMapper namespace SqlMapper
{ {
...@@ -57,6 +50,7 @@ static void Main(string[] args) ...@@ -57,6 +50,7 @@ static void Main(string[] args)
EnsureDBSetup(); EnsureDBSetup();
RunPerformanceTests(); RunPerformanceTests();
#endif #endif
Console.WriteLine("(end of tests; press any key)");
Console.ReadKey(); Console.ReadKey();
} }
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Linq;
using Dapper; using Dapper;
namespace SqlMapper namespace SqlMapper
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册