mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 21:56:03 +08:00
-
This commit is contained in:
parent
7a262728bc
commit
a010b6a8d2
@ -9,9 +9,10 @@ namespace PerformanceTest
|
||||
public class Config
|
||||
{
|
||||
public static string connectionString = "server=.;uid=sa;pwd=sasa;database=SqlSugarTest";
|
||||
public static ConnectionConfig SugarConfig =new ConnectionConfig() { InitKeyType = InitKeyType.SystemTable, ConnectionString = Config.connectionString, DbType = DbType.SqlServer };
|
||||
public static SqlSugarClient GetSugarConn()
|
||||
{
|
||||
return new SqlSugarClient(new ConnectionConfig() { InitKeyType = InitKeyType.SystemTable, ConnectionString = Config.connectionString, DbType = DbType.SqlServer });
|
||||
return new SqlSugarClient(SugarConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ namespace PerformanceTest
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//new TestGetAll().Init(OrmType.SqlSugar);
|
||||
new TestGetById().Init(OrmType.SqlSugar);
|
||||
new TestGetById().Init(OrmType.SqlSugar);
|
||||
//new TestSql().Init(OrmType.SqlSugar);
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ namespace PerformanceTest.TestItems
|
||||
{
|
||||
using (SqlConnection conn = new SqlConnection(Config.connectionString))
|
||||
{
|
||||
var list = conn.Get<Test>(1);
|
||||
var list = conn.Get<Test>(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user