Skip to content

Commit b55e8d7

Browse files
quick update of comments
1 parent 17d376b commit b55e8d7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Magic.IndexedDb/Models/MagicQuery.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,23 @@ public async Task<List<T>> ToListAsync()
129129
return (await Manager.WhereV2Async<T>(SchemaName, JsonQueries, this, default))?.ToList() ?? new List<T>();
130130
}
131131

132-
/* public IEnumerable<T> AsEnumerable()
132+
/*public IEnumerable<T> AsEnumerable()
133133
{
134134
return Manager.WhereV2Async<T>(SchemaName, JsonQueries, this, default)
135-
.ToBlockingEnumerable(); // ✅ Safe synchronous conversion
135+
.GetAwaiter()
136+
.GetResult()
137+
?? Enumerable.Empty<T>();
136138
}
137139
138140
public List<T> ToList()
139141
{
140142
return Manager.WhereV2Async<T>(SchemaName, JsonQueries, this, default)
141-
.ToBlockingEnumerable()
142-
.ToList();
143+
.GetAwaiter()
144+
.GetResult()
145+
?.ToList()
146+
?? new List<T>();
143147
}*/
144148

145-
146-
147149
public async Task<int> Count()
148150
{
149151
var result = await Manager.WhereV2Async<T>(SchemaName, JsonQueries, this, default);

0 commit comments

Comments
 (0)