- 修复 DbContext TrackList 对匿名对象处理的 bug;#150

This commit is contained in:
28810
2019-12-08 22:59:34 +08:00
parent dee1d9af8b
commit 65e3ed0091
3 changed files with 16 additions and 0 deletions

View File

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