DotNetNext / SqlSugar

.Net aot ORM Fastest ORM Simple Easy VB.NET Sqlite orm Oracle ORM Mysql Orm 虚谷数据库 postgresql ORm SqlServer oRm 达梦 ORM 人大金仓 ORM 神通ORM C# ORM , C# ORM .NET ORM NET5 ORM .NET6 ORM ClickHouse orm QuestDb ,TDengine ORM,OceanBase orm,GaussDB orm ,Tidb orm Object/Relational Mapping
https://www.donet5.com/Home/Doc
MIT License
5.27k stars 1.33k forks source link

Optimize tochildlist includeself #1084

Closed chuck2leo closed 1 year ago

chuck2leo commented 1 year ago

修改实现,使默认结果集包含传入的根节点,且位于列表首位 Modify the implementation so that the default result set contains the incoming root node and is at the top of the list

对应issue: https://www.donet5.com/Ask/9/16788

DotNetNext commented 1 year ago

没什么改变这次pull 看着就格式化了个代码

chuck2leo commented 1 year ago
  1. 简化ToChildList/ToChildListAsync代码,删除其中多余的取根逻辑,提升可读性
  2. 去除GetChildList没有用到的参数bool isRoot,统一调整为bool isContainOneself
  3. 将取根操作统一到BuildChildList,且将根节点置于索引0位置,优化使用体验
DotNetNext commented 1 year ago

image 我这边只能看到这么一点变化,你关掉,要下载最新的sqlsugar试一下看看

chuck2leo commented 1 year ago

image https://github.com/donet5/SqlSugar/pull/1084/files 我这边看到是有4个commit,+36行-86行