mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 增加 ISelect.ToChunk 实现分块查询数据,减少数据过大时内存占用;
This commit is contained in:
@ -48,6 +48,12 @@ namespace orm_vs
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var testlist1 = fsql.Select<Song>().OrderBy(a => a.Id).ToList();
|
||||
var testlist2 = new List<Song>();
|
||||
fsql.Select<Song>().OrderBy(a => a.Id).ToChunk(0, list =>
|
||||
{
|
||||
testlist2.AddRange(list);
|
||||
});
|
||||
|
||||
fsql.CodeFirst.SyncStructure(typeof(Song), typeof(Song_tag), typeof(Tag));
|
||||
//sugar.CodeFirst.InitTables(typeof(Song), typeof(Song_tag), typeof(Tag));
|
||||
|
Reference in New Issue
Block a user