Add user test case

This commit is contained in:
sunkaixuan 2024-04-15 20:55:39 +08:00
parent d896c78424
commit c0d361e588

View File

@ -1,6 +1,7 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
namespace OrmTest
{
@ -40,6 +41,21 @@ namespace OrmTest
jsonname=SqlFunc.JsonField(it.Order,"Name")
})
.ToList();
var list3=db.Queryable<UnitJsonTest>().Select(it => new
{
Order1 = new UnitJsonTest()
{
Id=it.Id,
Order = it.Order
}
}).ToList();
if (list3.First().Order1.Order == null|| list3.First().Order1.Order.Id==0)
{
throw new Exception("unit error");
}
}
/// <summary>