- 修复 LazyLoading 依赖项目 CSScript.Core 升级的 bug;(以上都不再升级该依赖)

This commit is contained in:
28810
2020-03-06 17:01:30 +08:00
parent 123ae07cfa
commit 2089a1f747
9 changed files with 437 additions and 5 deletions

View File

@ -78,7 +78,7 @@ namespace FreeSql
if (item == null) return;
var itemType = item.GetType();
if (itemType == typeof(object)) return;
if (itemType.FullName.StartsWith("Submission#")) itemType = itemType.BaseType;
if (itemType.FullName.Contains("FreeSqlLazyEntity__")) itemType = itemType.BaseType;
if (_db.Orm.CodeFirst.GetTableByEntity(itemType)?.Primarys.Any() != true) return;
var dbset = _db.Set(itemType);
dbset?.GetType().GetMethod("TrackToList", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(dbset, new object[] { list });