From 9519d2a57b2b28756f34e14f2e3d6dcc15e3afda Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 9 Jun 2022 20:01:02 +0800 Subject: [PATCH] Update .net core project --- .../Abstract/CodeFirstProvider/SplitCodeFirstProvider.cs | 2 +- .../SqlSugar/Abstract/QueryableProvider/NavigatManager.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/CodeFirstProvider/SplitCodeFirstProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/CodeFirstProvider/SplitCodeFirstProvider.cs index 29787a86f..7560cdcd5 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/CodeFirstProvider/SplitCodeFirstProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/CodeFirstProvider/SplitCodeFirstProvider.cs @@ -18,7 +18,7 @@ namespace SqlSugar public void InitTables(Type type) { - var isSplitEntity = type.GetCustomAttributes() != null; + var isSplitEntity = type.GetCustomAttribute() != null; if (isSplitEntity) { _InitTables(type); diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs index 8c0f100d5..4b28342aa 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs @@ -354,7 +354,7 @@ namespace SqlSugar { //var setValue = navList // .Where(x => navColumn.PropertyInfo.GetValue(x).ObjToString() == listItemPkColumn.PropertyInfo.GetValue(item).ObjToString()).ToList(); - var groupQuery = (from l in list + var groupQuery = (from l in list.Distinct() join n in navList on listItemPkColumn.PropertyInfo.GetValue(l).ObjToString() equals navColumn.PropertyInfo.GetValue(n).ObjToString()