2022-01-09 14:39:11 +08:00
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace OrmTest
|
|
|
|
|
{
|
|
|
|
|
public class UCustom05
|
|
|
|
|
{
|
|
|
|
|
public static void Init()
|
|
|
|
|
{
|
2022-01-09 15:04:50 +08:00
|
|
|
|
|
2022-01-09 14:39:11 +08:00
|
|
|
|
var db = NewUnitTest.Db;
|
2022-01-09 15:04:50 +08:00
|
|
|
|
var id=db.Insertable(new Order() { CreateTime = DateTime.Now, Name = "a", Price =Convert.ToDecimal( 111.00) , CustomId = 1 }).ExecuteReturnIdentity();
|
2022-01-09 14:39:11 +08:00
|
|
|
|
var data = db.GetSimpleClient<Order>().GetById(id);
|
|
|
|
|
var x=db.Storageable(data).WhereColumns(it=>it.Price).ToStorage();
|
|
|
|
|
Check.Exception(x.UpdateList.Count == 0, "unit error");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|