You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
846 B
29 lines
846 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Chloe;
|
|
using Chloe.SqlServer;
|
|
using OrmTest.Models;
|
|
|
|
namespace OrmTest.PerformanceTesting
|
|
{
|
|
public class ChloeORMPerformance: PerformanceBase
|
|
{
|
|
public ChloeORMPerformance(int eachCount)
|
|
{
|
|
this.count = eachCount;
|
|
}
|
|
public void Select()
|
|
{
|
|
MsSqlContext db = new MsSqlContext(Config.ConnectionString);
|
|
db.Query<Student>().Select(it => new ViewModelStudent2 { Name = it.Name, Student = it }).ToList();
|
|
base.Execute("chloe", () =>
|
|
{
|
|
var test = db.Query<Student>().Select(it => new ViewModelStudent2 { Name = it.Name, Student = it }).ToList();
|
|
});
|
|
db.Dispose();
|
|
}
|
|
}
|
|
}
|
|
|