2017-09-21 13:52:52 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2017-09-21 14:22:23 +08:00
|
|
|
|
using PerformanceTest.TestItems;
|
2017-09-21 13:52:52 +08:00
|
|
|
|
|
|
|
|
|
namespace PerformanceTest
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
2017-09-22 17:49:15 +08:00
|
|
|
|
|
2017-09-21 13:52:52 +08:00
|
|
|
|
/// <summary>
|
2017-09-22 17:49:15 +08:00
|
|
|
|
/// 注意注意注意注意注意:分开测试比较公平,并且请在Realse模式下启动程序(SqlSugar直接引用的是项目)
|
2017-09-21 13:52:52 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="args"></param>
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
2017-09-22 18:13:04 +08:00
|
|
|
|
var type = DemoType.GetAll;
|
|
|
|
|
var ormType = OrmType.Dapper;
|
|
|
|
|
switch (type)
|
|
|
|
|
{
|
|
|
|
|
case DemoType.GetAll:
|
|
|
|
|
new TestGetAll().Init(ormType);
|
|
|
|
|
break;
|
|
|
|
|
case DemoType.GetById:
|
|
|
|
|
new TestGetAll().Init(ormType);
|
|
|
|
|
break;
|
|
|
|
|
case DemoType.TestSql:
|
|
|
|
|
new TestGetAll().Init(ormType);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
2017-09-21 13:52:52 +08:00
|
|
|
|
Console.ReadKey();
|
|
|
|
|
}
|
2017-09-22 18:13:04 +08:00
|
|
|
|
enum DemoType
|
|
|
|
|
{
|
|
|
|
|
GetAll,
|
|
|
|
|
GetById,
|
|
|
|
|
TestSql
|
|
|
|
|
}
|
2017-09-21 13:52:52 +08:00
|
|
|
|
}
|
|
|
|
|
}
|