mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
-
This commit is contained in:
parent
9f45293f23
commit
146a83abdf
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
|
||||||
namespace PerformanceTest.Items
|
namespace PerformanceTest
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 性能测试类,用于循环执行代码并统计时间
|
/// 性能测试类,用于循环执行代码并统计时间
|
||||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace PerformanceTest.Items
|
namespace PerformanceTest
|
||||||
{
|
{
|
||||||
public class Config
|
public class Config
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ namespace PerformanceTest
|
|||||||
/// <param name="args"></param>
|
/// <param name="args"></param>
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
new TestGetAll().Init();
|
//new TestGetAll().Init();
|
||||||
new TestGetById().Init();
|
new TestGetById().Init();
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Dapper.Contrib.Extensions;
|
using Dapper.Contrib.Extensions;
|
||||||
using PerformanceTest.Items;
|
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -43,7 +42,7 @@ namespace PerformanceTest.TestItems
|
|||||||
{
|
{
|
||||||
using (SqlSugarClient conn = new SqlSugarClient(new ConnectionConfig() { InitKeyType = InitKeyType.SystemTable, ConnectionString = Config.connectionString, DbType = DbType.SqlServer }))
|
using (SqlSugarClient conn = new SqlSugarClient(new ConnectionConfig() { InitKeyType = InitKeyType.SystemTable, ConnectionString = Config.connectionString, DbType = DbType.SqlServer }))
|
||||||
{
|
{
|
||||||
var list2 = conn.Queryable<Test>().ToList();
|
var list2 = conn.Queryable<Test>().InSingle(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -57,7 +56,7 @@ namespace PerformanceTest.TestItems
|
|||||||
{
|
{
|
||||||
using (SqlConnection conn = new SqlConnection(Config.connectionString))
|
using (SqlConnection conn = new SqlConnection(Config.connectionString))
|
||||||
{
|
{
|
||||||
var list = conn.GetAll<Test>();
|
var list = conn.Get<Test>(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user