mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-26 14:15:50 +08:00
-
This commit is contained in:
@@ -40,13 +40,14 @@ namespace PerformanceTest.TestItems
|
||||
|
||||
PerHelper.Execute(eachCount, "SqlSugar", () =>
|
||||
{
|
||||
using (SqlSugarClient conn = new SqlSugarClient(new ConnectionConfig() { InitKeyType=InitKeyType.SystemTable, ConnectionString= Config.connectionString, DbType=DbType.SqlServer }))
|
||||
using (SqlSugarClient conn = Config.GetSugarConn())
|
||||
{
|
||||
var list2 = conn.Queryable<Test>().ToList();
|
||||
var list2 = conn.Queryable<Test>().ToList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private static void Dapper(int eachCount)
|
||||
{
|
||||
GC.Collect();//回收资源
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace PerformanceTest.TestItems
|
||||
|
||||
PerHelper.Execute(eachCount, "SqlSugar", () =>
|
||||
{
|
||||
using (SqlSugarClient conn = new SqlSugarClient(new ConnectionConfig() { InitKeyType = InitKeyType.SystemTable, ConnectionString = Config.connectionString, DbType = DbType.SqlServer }))
|
||||
using (SqlSugarClient conn = Config.GetSugarConn())
|
||||
{
|
||||
var list2 = conn.Queryable<Test>().InSingle(1);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace PerformanceTest.TestItems
|
||||
|
||||
PerHelper.Execute(eachCount, "SqlSugar", () =>
|
||||
{
|
||||
using (SqlSugarClient conn = new SqlSugarClient(new ConnectionConfig() { InitKeyType = InitKeyType.SystemTable, ConnectionString = Config.connectionString, DbType = DbType.SqlServer }))
|
||||
using (SqlSugarClient conn = Config.GetSugarConn())
|
||||
{
|
||||
var list2 = conn.Ado.SqlQuery<Test>("select top 10 * from Test"); ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user