SqlSugar/Src/Asp.Net/PerformanceTest/Program.cs

44 lines
1.1 KiB
C#
Raw Normal View History

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-12-20 10:27:16 +08:00
var type = DemoType.GetAll;
2017-09-29 10:56:37 +08:00
var ormType = OrmType.Dapper;
2017-09-22 18:13:04 +08:00
switch (type)
{
case DemoType.GetAll:
new TestGetAll().Init(ormType);
break;
case DemoType.GetById:
2017-09-22 18:17:00 +08:00
new TestGetById().Init(ormType);
2017-09-22 18:13:04 +08:00
break;
2017-09-22 18:17:00 +08:00
case DemoType.GetSql:
new TestGetSql().Init(ormType);
2017-09-22 18:13:04 +08:00
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,
2017-09-22 18:17:00 +08:00
GetSql
2017-09-22 18:13:04 +08:00
}
2017-09-21 13:52:52 +08:00
}
}