This commit is contained in:
sunkaixuan
2017-05-23 06:19:11 +08:00
parent 8b2c3fd122
commit 1d2418d606
6 changed files with 11 additions and 44 deletions

View File

@@ -18,7 +18,6 @@ namespace OrmTest.Models
public string Name { get; set; }
public DateTime? CreateTime { get; set; }
[SugarColumn(IsIgnore=true)]
[NotMappedAttribute]
public int TestId { get; set; }
}
}

View File

@@ -62,7 +62,6 @@
<Compile Include="Demo\Query.cs" />
<Compile Include="Demo\Update.cs" />
<Compile Include="Models\ViewModelStudent.cs" />
<Compile Include="PerformanceTesting\ChloeORMPerformance.cs" />
<Compile Include="PerformanceTesting\PerformanceBase.cs" />
<Compile Include="PerformanceTesting\SqlSugarPerformance.cs" />
<Compile Include="UnitTest\Delete.cs" />
@@ -94,8 +93,6 @@
</ItemGroup>
<ItemGroup>
<Content Include="DataBase\script.sql" />
<Content Include="OtherDll\Chloe.dll" />
<Content Include="OtherDll\Chloe.SqlServer.dll" />
<Content Include="OtherDll\SyntacticSugar.dll" />
</ItemGroup>
<ItemGroup>

Binary file not shown.

Binary file not shown.

View File

@@ -1,29 +0,0 @@
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();
}
}
}

View File

@@ -18,17 +18,17 @@ namespace OrmTest
static void Main(string[] args)
{
/***Unit Test***/
new Field(1).Init();
new Where(1).Init();
new Method(1).Init();
new JoinQuery(1).Init();
new SingleQuery(1).Init();
new SelectQuery(1).Init();
new AutoClose(1).Init();
new Insert(1).Init();
new Delete(1).Init();
new Update(1).Init();
new Mapping(1).Init();
//new Field(1).Init();
//new Where(1).Init();
//new Method(1).Init();
//new JoinQuery(1).Init();
//new SingleQuery(1).Init();
//new SelectQuery(1).Init();
//new AutoClose(1).Init();
//new Insert(1).Init();
//new Delete(1).Init();
//new Update(1).Init();
//new Mapping(1).Init();
/***Performance Test***/
new SqlSugarPerformance(100).Select();