mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-09 02:44:58 +08:00
-
This commit is contained in:
@@ -125,6 +125,17 @@ namespace SqlSugar
|
|||||||
this.Context.Utilities.PageEach(allDatas, 300, itemList =>
|
this.Context.Utilities.PageEach(allDatas, 300, itemList =>
|
||||||
{
|
{
|
||||||
List<IConditionalModel> conditList = new List<IConditionalModel>();
|
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()
|
var condition = new ConditionalCollections()
|
||||||
{
|
{
|
||||||
ConditionalList = new List<KeyValuePair<WhereType, SqlSugar.ConditionalModel>>()
|
ConditionalList = new List<KeyValuePair<WhereType, SqlSugar.ConditionalModel>>()
|
||||||
@@ -138,15 +149,9 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
FieldName = item.DbColumnName,
|
FieldName = item.DbColumnName,
|
||||||
ConditionalType = ConditionalType.Equal,
|
ConditionalType = ConditionalType.Equal,
|
||||||
FieldValue = item.PropertyInfo.GetValue(dataItem,null)+""
|
FieldValue = item.PropertyInfo.GetValue(dataItem, null) + ""
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
var addItem = this.Context.Queryable<T>().Where(conditList).ToList();
|
|
||||||
this.dbDataList.AddRange(addItem);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user