This commit is contained in:
sunkaixuan
2017-05-28 09:15:34 +08:00
parent 2f5af83189
commit 138ea91bba
34 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;
using OrmTest.Models;
namespace OrmTest.PerformanceTesting
{
public class SqlSugarPerformance : PerformanceBase
{
public SqlSugarPerformance(int eachCount)
{
this.count = eachCount;
}
public void Select()
{
SqlSugarClient db = new SqlSugarClient(new SystemTableConfig()
{
ConnectionString = Config.ConnectionString,
DbType = DbType.SqlServer,
IsAutoCloseConnection = false
});
db.IgnoreColumns.Add("TestId", "Student");
db.Queryable<Student>().Select(it => new ViewModelStudent2 { Name = it.Name, Student = it }).ToList();
base.Execute("sqlsuagr", () =>
{
var test = db.Queryable<Student>().Select(it => new ViewModelStudent2 { Name = it.Name, Student = it }).ToList();
});
db.Close();
}
}
}