Skip to content

Commit b32f3d8

Browse files
committed
refactor: 增加 ToList 方法调用
1 parent 5a23354 commit b32f3d8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/extensions/BootstrapBlazor.DataAccess.EntityFrameworkCore/DefaultDataService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public Task EditAsync(object model)
6565
if (existingEntity != null)
6666
{
6767
_db.Entry(existingEntity).State = EntityState.Detached;
68-
}
68+
}
6969
}
7070
return Task.CompletedTask;
7171
}
@@ -134,7 +134,7 @@ public override Task<QueryData<TModel>> QueryAsync(QueryPageOptions option)
134134
var ret = new QueryData<TModel>()
135135
{
136136
TotalCount = count,
137-
Items = items,
137+
Items = items.ToList(),
138138
IsSorted = option.SortOrder != SortOrder.Unset,
139139
IsFiltered = option.Filters.Count > 0,
140140
IsAdvanceSearch = option.AdvanceSearches.Count > 0,

0 commit comments

Comments
 (0)