This commit is contained in:
sunkaixuan 2017-09-21 15:09:39 +08:00
parent 7a262728bc
commit a010b6a8d2
3 changed files with 4 additions and 3 deletions

View File

@ -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);
}
}
}

View File

@ -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();
}

View File

@ -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);
}
});
}