- 优化 内部代码 GeTableRef

This commit is contained in:
2881099
2022-09-03 13:13:17 +08:00
parent 6703af3185
commit 074dd7f13d
9 changed files with 154 additions and 55 deletions

View File

@ -715,8 +715,8 @@ namespace FreeSql
List<NativeTuple<TableRef, PropertyInfo>> LocalGetNavigates(TableInfo tb)
{
return tb.Properties.Where(a => tb.ColumnsByCs.ContainsKey(a.Key) == false)
.Select(a => new NativeTuple<TableRef, PropertyInfo>(tb.GetTableRef(a.Key, false), a.Value))
return tb.GetAllTableRef().Where(a => tb.ColumnsByCs.ContainsKey(a.Key) == false && a.Value.Exception == null)
.Select(a => new NativeTuple<TableRef, PropertyInfo>(a.Value, tb.Properties[a.Key]))
.Where(a => a.Item1 != null && new[] { TableRefType.OneToOne, TableRefType.OneToMany, TableRefType.ManyToMany }.Contains(a.Item1.RefType))
.ToList();
}

View File

@ -800,14 +800,5 @@
<param name="that"></param>
<returns></returns>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.FreeSqlRepositoryDependencyInjection.AddFreeRepository(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{FreeSql.FluentDataFilter},System.Reflection.Assembly[])">
<summary>
批量注入 Repository可以参考代码自行调整
</summary>
<param name="services"></param>
<param name="globalDataFilter"></param>
<param name="assemblies"></param>
<returns></returns>
</member>
</members>
</doc>