I'm working in Blazor preview 3.2 attempting to utilize IAsyncEnumerable in my client-side blazor-wasm project. All of my libraries are updated to the latest previews. And my code is posted below. On the server side of things I can walk through it and see it properly returning the specials.
However I see the error below in the browser console. Any help figuring this out would be appreciated.
Error
Client Side Code
protected async override Task OnInitializedAsync()
{
await LoadSpecials();
}
public async Task<IAsyncEnumerable<Special>> LoadSpecials()
{
return await HttpClient.GetJsonAsync<IAsyncEnumerable<Special>>("api/specials");
}
Controller
[HttpGet]
public async IAsyncEnumerable<Special> Get()
{
await foreach (Special special in _db.Specials.Include(o => o.ImageFile).AsAsyncEnumerable())
{
await Task.Delay(1000);
yield return special;
}
}