Update demo

This commit is contained in:
sunkaixuan 2023-12-20 18:47:43 +08:00
parent 1ea4c7c2e2
commit 288cba819f

View File

@ -22,11 +22,11 @@ namespace OrmTest
{
Id = t.Id,
Name = t.AName,
Amount = SqlFunc.Subqueryable<TableB>()
Amount = SqlFunc.IsNull(SqlFunc.Subqueryable<TableB>()
.LeftJoin<TableC>((tableB, tableC) => tableB.TableCId == tableC.Id)
.LeftJoin<TableD>((tableB, tableC, tableD) => tableB.TableDId == tableD.Id)
.Where((tableB, tableC, tableD) => tableD.TableAId == t.Id)
.Sum((tableB, tableC, tableD) => SqlFunc.IsNull(tableB.Quantity * tableB.Price, 0))
.Sum((tableB, tableC, tableD) =>tableB.Quantity * tableB.Price), 0)
}).ToPageListAsync(pageIndex, pageSize, total).GetAwaiter().GetResult();
}