This commit is contained in:
skx
2021-01-29 01:21:27 +08:00
parent 5a9478ee0d
commit 0d95bfef6e

View File

@@ -125,6 +125,17 @@ namespace SqlSugar
this.Context.Utilities.PageEach(allDatas, 300, itemList =>
{
List<IConditionalModel> conditList = new List<IConditionalModel>();
SetConditList(itemList, whereColumns, conditList);
var addItem = this.Context.Queryable<T>().Where(conditList).ToList();
this.dbDataList.AddRange(addItem);
});
}
return this;
}
}
private static void SetConditList(List<StorageableInfo<T>> itemList, List<EntityColumnInfo> whereColumns, List<IConditionalModel> conditList)
{
var condition = new ConditionalCollections()
{
ConditionalList = new List<KeyValuePair<WhereType, SqlSugar.ConditionalModel>>()
@@ -141,12 +152,6 @@ namespace SqlSugar
FieldValue = item.PropertyInfo.GetValue(dataItem, null) + ""
}));
}
var addItem = this.Context.Queryable<T>().Where(conditList).ToList();
this.dbDataList.AddRange(addItem);
}
});
}
return this;
}
}