From 2c0f3cd0660251c24b96617edda7f68a25e4d985 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 25 Aug 2025 14:38:52 +0800 Subject: [PATCH] Update nav query --- .../EntityMaintenance/EntityColumnExtension.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/EntityMaintenance/EntityColumnExtension.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/EntityMaintenance/EntityColumnExtension.cs index aa9a797b8..ef538a54b 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/EntityMaintenance/EntityColumnExtension.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/EntityMaintenance/EntityColumnExtension.cs @@ -53,7 +53,7 @@ namespace SqlSugar } return this; } - public EntityColumnable OneToMany(Expression> propertyExpression, string firstName, string lastName) + public EntityColumnable OneToMany(Expression> propertyExpression, string firstName, string lastName=null) { var name = ExpressionTool.GetMemberName(propertyExpression); if (entityColumnInfo.PropertyName == name && IsTable) @@ -63,6 +63,16 @@ namespace SqlSugar } return this; } + public EntityColumnable OneToManyByArrayList(Expression> propertyExpression, string firstName, string lastName=null) + { + var name = ExpressionTool.GetMemberName(propertyExpression); + if (entityColumnInfo.PropertyName == name && IsTable) + { + entityColumnInfo.Navigat = new Navigate(NavigateType.OneToManyByArrayList, firstName, lastName); + entityColumnInfo.IsIgnore = true; + } + return this; + } public EntityColumnable ManyToMany(Expression> propertyExpression,Type mapppingType, string mapppingTypeAid, string mapppingTypeBid) {