Replies: 2 comments 1 reply
-
@bsulliva You currently can make async database calls with OData and EF Core when you have this format of a controller action method: [EnableQuery]
public IAsyncEnumerable<Person> Get()
{
var query = this.dbContext.Persons.AsAsyncEnumerable();
return query;
} |
Beta Was this translation helpful? Give feedback.
-
I think if you have an [EnableQuery]
public IAsyncEnumerable<Person> Get()
{
var query = this.dbContext.Persons.AsAsyncEnumerable();
return query;
} is a query that you can apply the various OData query options to before database calls are made.. This means that the filtering, sorting or paging will happen at the DB level and not in the application.. The only difference here is that the db calls will be made asynchronously. |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm new to OData so just trying to understand the basics. From what I understand so far, we want to hook OData up to IQueryable DB queries to it can modify the queries to add filtering/sorting/paging. But I don't see any documentation or examples around using async code with IQueryable with OData. Can you please point me to some examples or docs around this? Or is async not supported with IQueryable in OData?
Beta Was this translation helpful? Give feedback.
All reactions