2019-05-16 20:25:11 +08:00
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System;
|
2019-05-07 09:12:38 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace OrmTest
|
|
|
|
|
{
|
|
|
|
|
public partial class NewUnitTest
|
|
|
|
|
{
|
2019-05-16 20:25:11 +08:00
|
|
|
|
public static SqlSugarClient Db=> new SqlSugarClient(new ConnectionConfig()
|
|
|
|
|
{
|
|
|
|
|
DbType = DbType.SqlServer,
|
|
|
|
|
ConnectionString = Config.ConnectionString,
|
|
|
|
|
InitKeyType = InitKeyType.Attribute,
|
|
|
|
|
IsAutoCloseConnection = true,
|
|
|
|
|
AopEvents = new AopEvents
|
|
|
|
|
{
|
|
|
|
|
OnLogExecuting = (sql, p) =>
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(sql);
|
2019-05-16 22:16:55 +08:00
|
|
|
|
Console.WriteLine(string.Join(",", p?.Select(it => it.ParameterName + ":" + it.Value)));
|
2019-05-16 20:25:11 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2019-06-02 11:09:03 +08:00
|
|
|
|
|
|
|
|
|
public static void RestData()
|
|
|
|
|
{
|
|
|
|
|
Db.DbMaintenance.TruncateTable<Order>();
|
|
|
|
|
Db.DbMaintenance.TruncateTable<OrderItem>();
|
|
|
|
|
}
|
2019-05-07 09:12:38 +08:00
|
|
|
|
public static void Init()
|
|
|
|
|
{
|
2022-08-10 14:07:15 +08:00
|
|
|
|
UCustom025.Init();
|
2022-08-05 23:57:23 +08:00
|
|
|
|
UnitTestConfigQuery.Init();
|
2022-08-05 15:06:01 +08:00
|
|
|
|
UnitSub.Init();
|
2022-08-05 08:55:21 +08:00
|
|
|
|
UnitUpdateNavN3.Init();
|
2022-08-04 11:57:16 +08:00
|
|
|
|
UnitOneToOne12.Init();
|
2022-08-03 10:44:33 +08:00
|
|
|
|
UnitInsertNav3.Init();
|
2022-08-02 22:25:33 +08:00
|
|
|
|
UnitInsertNav2.Init();
|
2022-08-02 22:10:00 +08:00
|
|
|
|
UnitInsertNav.Init();
|
|
|
|
|
UnitInsertNav.Init();
|
2022-08-02 20:56:02 +08:00
|
|
|
|
UnitSelectN.Init();
|
2022-08-01 16:38:23 +08:00
|
|
|
|
UnitOneToOneN2.Init();
|
2022-07-30 18:04:29 +08:00
|
|
|
|
UnitManyToManyUpdate.Init();
|
2022-07-28 17:23:00 +08:00
|
|
|
|
UnitManyToMay1231.Init();
|
2022-07-26 22:27:10 +08:00
|
|
|
|
UnitUpdateNav2.Init();
|
2022-07-26 22:24:02 +08:00
|
|
|
|
UnitUpdateNav.Init();
|
2022-07-26 21:34:38 +08:00
|
|
|
|
UnitOneToOneN.Init();
|
2022-07-24 16:57:35 +08:00
|
|
|
|
ULock.Init();
|
2022-07-04 10:27:59 +08:00
|
|
|
|
UnitManyToMany2.Init();
|
2022-07-04 06:41:17 +08:00
|
|
|
|
UOneManyMany5.init();
|
2022-07-03 04:37:53 +08:00
|
|
|
|
UOneManyMany4.init();
|
2022-07-03 04:23:35 +08:00
|
|
|
|
UOneManyMany3.init();
|
2022-07-03 03:18:39 +08:00
|
|
|
|
UOneManyMany2.init();
|
2022-07-03 01:00:09 +08:00
|
|
|
|
UOneManyMany.init();
|
2022-06-27 21:32:08 +08:00
|
|
|
|
UNavDynamic111N.Init();
|
2022-06-09 19:52:26 +08:00
|
|
|
|
UCustomNavigate01.Init();
|
2022-06-07 19:40:05 +08:00
|
|
|
|
UCustom023.Init();
|
2022-05-30 14:14:35 +08:00
|
|
|
|
UCustom22.Init();
|
2022-05-13 20:36:37 +08:00
|
|
|
|
UByteArray.Init();
|
2022-05-19 16:06:17 +08:00
|
|
|
|
UCustom021.Inti();
|
2022-05-10 10:02:35 +08:00
|
|
|
|
UCustom020.Init();
|
2022-05-07 10:58:27 +08:00
|
|
|
|
UCustom019.Init();
|
2022-04-25 13:50:27 +08:00
|
|
|
|
UnitManyToMany.Init();
|
2022-04-17 19:05:28 +08:00
|
|
|
|
UCustom018.Init();
|
2022-04-15 23:52:19 +08:00
|
|
|
|
UCustom017.Init();
|
2022-04-14 17:22:14 +08:00
|
|
|
|
UCustom016.Init();
|
2022-04-13 22:28:06 +08:00
|
|
|
|
UCustom015.Init();
|
2022-04-13 21:45:20 +08:00
|
|
|
|
UCustom014.Init();
|
2022-04-12 16:27:23 +08:00
|
|
|
|
UCustom013.Init();
|
2022-04-10 01:27:47 +08:00
|
|
|
|
UCustom012.Init();
|
2022-04-29 18:50:58 +08:00
|
|
|
|
UintDynamic.Init();
|
2022-03-26 10:02:29 +08:00
|
|
|
|
UCustom09.Init();
|
2022-03-23 10:32:39 +08:00
|
|
|
|
UCustom011.Init();
|
2022-03-16 21:38:14 +08:00
|
|
|
|
UCustom010.Init();
|
2022-03-16 13:47:04 +08:00
|
|
|
|
UCustom08.Init();
|
2022-03-04 14:19:41 +08:00
|
|
|
|
UCustom07.Init();
|
2021-12-24 20:11:23 +08:00
|
|
|
|
UCustom01.Init();
|
2021-12-25 14:25:48 +08:00
|
|
|
|
UCustom02.Init();
|
2021-12-25 20:28:38 +08:00
|
|
|
|
UCustom03.Init();
|
2022-01-05 20:06:33 +08:00
|
|
|
|
UCustom04.Init();
|
2022-01-09 14:39:11 +08:00
|
|
|
|
UCustom05.Init();
|
2022-01-18 11:42:19 +08:00
|
|
|
|
UCustom06.Init();
|
2021-12-25 11:48:02 +08:00
|
|
|
|
SubQueryTest();
|
2021-12-16 01:45:54 +08:00
|
|
|
|
UConfig();
|
2021-12-01 13:45:22 +08:00
|
|
|
|
DeleteTest();
|
2021-11-23 17:37:37 +08:00
|
|
|
|
Fastest2();
|
2021-10-31 12:34:18 +08:00
|
|
|
|
SplitTest();
|
2021-01-30 17:23:41 +08:00
|
|
|
|
Filter();
|
2021-01-28 21:09:15 +08:00
|
|
|
|
Insert();
|
2021-03-02 19:58:42 +08:00
|
|
|
|
Insert2();
|
2021-01-27 03:49:53 +08:00
|
|
|
|
Enum();
|
2021-01-16 16:28:15 +08:00
|
|
|
|
Tran();
|
2019-06-09 20:14:39 +08:00
|
|
|
|
Queue();
|
2019-05-26 17:07:09 +08:00
|
|
|
|
CodeFirst();
|
2019-05-21 12:41:18 +08:00
|
|
|
|
Updateable();
|
2019-05-16 20:25:11 +08:00
|
|
|
|
Json();
|
2019-05-19 11:36:49 +08:00
|
|
|
|
Ado();
|
2019-05-20 16:15:01 +08:00
|
|
|
|
Queryable();
|
2020-12-28 12:58:49 +08:00
|
|
|
|
Queryable2();
|
2019-05-19 18:10:12 +08:00
|
|
|
|
QueryableAsync();
|
2021-07-31 19:46:56 +08:00
|
|
|
|
AopTest();
|
2020-11-12 20:27:33 +08:00
|
|
|
|
//Thread();
|
|
|
|
|
//Thread2();
|
|
|
|
|
//Thread3();
|
2019-05-07 09:12:38 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|