-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
EnhancementFP: UnplannedSync status with associated Feedback ItemSync status with associated Feedback ItemS: Wrappers (ASP.NET Core)S: Wrappers (ASP.NET MVC)
Description
In the example below, "products" is actually a DbSet<Product>:
public async Task<ActionResult> Products_Read([DataSourceRequest]DataSourceRequest request)
{
using (var northwind = new SampleEntities())
{
IQueryable<Product> products = northwind.Products;
DataSourceResult result = await products.ToDataSourceResultAsync(request);
return Json(result);
}
}
Under the hood the ToDataSourceResultAsync call is executed inside Task.Run().
And that Task.Run is calling sync methods of IQueryable which means EntityframeworkCore queries are not taking place with async I/O
GhalamborM, iqoOopi, patAtBwalk, drashidian and KelvisGama
Metadata
Metadata
Assignees
Labels
EnhancementFP: UnplannedSync status with associated Feedback ItemSync status with associated Feedback ItemS: Wrappers (ASP.NET Core)S: Wrappers (ASP.NET MVC)