In an ASP.NET Core WebApi Application I succesfully used IAsyncEnumerable<T>
as return type by the controller.
Now I'd like to know if(and how) i can use IAsyncEnumerable<T>
as input parameter.
Something like this :
[Route("Operation")]
[HttpPost]
public async Task Operation(IAsyncEnumerable<Entity> commands)
{
await foreach (Entity command in commands)
{
// do something
}
}
I searched some articles but I found only articles on how to return it.
Is there a way to use IAsyncEnumerable<T>
as an input parameter?