diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertNavMethodInfo.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertNavMethodInfo.cs index 2622b2ed5..601c76f07 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertNavMethodInfo.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertNavMethodInfo.cs @@ -26,7 +26,7 @@ namespace SqlSugar } public InsertNavMethodInfo ThenIncludeByNameString(string navMemberName, UpdateNavOptions updateNavOptions = null) { - var type = MethodInfos.GetType().GetGenericArguments()[0]; + var type = MethodInfos.GetType().GetGenericArguments()[1]; var entityInfo = this.Context.EntityMaintenance.GetEntityInfo(type); Type properyItemType; bool isList; diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateNavMethodInfo.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateNavMethodInfo.cs index 15f4b9e8f..949c1d27f 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateNavMethodInfo.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateNavMethodInfo.cs @@ -27,7 +27,7 @@ namespace SqlSugar } public UpdateNavMethodInfo ThenIncludeByNameString(string navMemberName, UpdateNavOptions updateNavOptions = null) { - var type = MethodInfos.GetType().GetGenericArguments()[0]; + var type = MethodInfos.GetType().GetGenericArguments()[1]; var entityInfo = this.Context.EntityMaintenance.GetEntityInfo(type); Type properyItemType; bool isList;