public bool SaveBillInfo(Bill billBase, List<BillDetail> Details)
{
return BeginTransaction(() =>
{
if (!Select().Any(b => b.TSB_UUID.Equals(billBase.TSB_UUID)))
{
Insert(billBase);
InsertMany(billDetails);
}
else
{
UpdateMany(billDetails);
UpdateOne(billBase);
}
});
}
在前面直接用,记得传主键id,不然得加条件。