mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 16:18:47 +08:00
Add unit test
This commit is contained in:
parent
4c77477706
commit
2ece2aef4a
@ -31,68 +31,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
UCustom025.Init();
|
|
||||||
UnitTestConfigQuery.Init();
|
|
||||||
UnitSub.Init();
|
|
||||||
UnitUpdateNavN3.Init();
|
|
||||||
UnitOneToOne12.Init();
|
|
||||||
UnitInsertNav3.Init();
|
|
||||||
UnitInsertNav2.Init();
|
|
||||||
UnitInsertNav.Init();
|
|
||||||
UnitInsertNav.Init();
|
|
||||||
UnitSelectN.Init();
|
|
||||||
UnitOneToOneN2.Init();
|
|
||||||
UnitManyToManyUpdate.Init();
|
|
||||||
UnitManyToMay1231.Init();
|
|
||||||
UnitUpdateNav2.Init();
|
|
||||||
UnitUpdateNav.Init();
|
|
||||||
UnitOneToOneN.Init();
|
|
||||||
ULock.Init();
|
|
||||||
UnitManyToMany2.Init();
|
|
||||||
UOneManyMany5.init();
|
|
||||||
UOneManyMany4.init();
|
|
||||||
UOneManyMany3.init();
|
|
||||||
UOneManyMany2.init();
|
|
||||||
UOneManyMany.init();
|
|
||||||
UNavDynamic111N.Init();
|
|
||||||
UCustomNavigate01.Init();
|
|
||||||
UCustom023.Init();
|
|
||||||
UCustom22.Init();
|
|
||||||
UByteArray.Init();
|
|
||||||
UCustom021.Inti();
|
|
||||||
UCustom020.Init();
|
|
||||||
UCustom019.Init();
|
|
||||||
UnitManyToMany.Init();
|
|
||||||
UCustom018.Init();
|
|
||||||
UCustom017.Init();
|
|
||||||
UCustom016.Init();
|
|
||||||
UCustom015.Init();
|
|
||||||
UCustom014.Init();
|
|
||||||
UCustom013.Init();
|
|
||||||
UCustom012.Init();
|
|
||||||
UintDynamic.Init();
|
|
||||||
UCustom09.Init();
|
|
||||||
UCustom011.Init();
|
|
||||||
UCustom010.Init();
|
|
||||||
UCustom08.Init();
|
|
||||||
UCustom07.Init();
|
|
||||||
UCustom01.Init();
|
|
||||||
UCustom02.Init();
|
|
||||||
UCustom03.Init();
|
|
||||||
UCustom04.Init();
|
|
||||||
UCustom05.Init();
|
|
||||||
UCustom06.Init();
|
|
||||||
SubQueryTest();
|
|
||||||
UConfig();
|
|
||||||
DeleteTest();
|
|
||||||
Fastest2();
|
|
||||||
SplitTest();
|
|
||||||
Filter();
|
|
||||||
Insert();
|
|
||||||
Insert2();
|
|
||||||
Enum();
|
|
||||||
Tran();
|
|
||||||
Queue();
|
|
||||||
CodeFirst();
|
CodeFirst();
|
||||||
Updateable();
|
Updateable();
|
||||||
Json();
|
Json();
|
||||||
|
@ -101,6 +101,61 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
z=SqlFunc.Subqueryable<Unitasdfafasx>().Select(s=>s.id)
|
z=SqlFunc.Subqueryable<Unitasdfafasx>().Select(s=>s.id)
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
db.CodeFirst.InitTables<ApiLog>();
|
||||||
|
|
||||||
|
|
||||||
|
var list3=db.Queryable<ApiLog>().ToList();
|
||||||
|
db.Insertable<Dictionary<string,object>>(new ApiLog(1) { RequestUser="a"}).ExecuteCommand();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
|
||||||
|
/// 接口请求
|
||||||
|
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public class ApiLog
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
|
||||||
|
/// Id
|
||||||
|
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public long Id { get; protected set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
|
||||||
|
/// 请求用户
|
||||||
|
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public string RequestUser { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private ApiLog()
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ApiLog(long Id)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
this.Id = Id;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[SugarTable("[1.1.dsfadsaf]")]
|
[SugarTable("[1.1.dsfadsaf]")]
|
||||||
|
Loading…
Reference in New Issue
Block a user