maybe I am wrong and this is actually ok behaviour, but then I dont get, why they would even put the async postfix to the method name and make it awaitable.
Just to easily reproduce, this is enough:
private async void Button_Click(object sender, RoutedEventArgs e)
{
using var ctx = new eWMSContext();
var a = await ctx.TJobLines.ToListAsync();
}
This call blocks UI even though it seems it shouldn't and wrapping it to Task.Run
doesn't seem logical.
I was unable to find any resource why is it happening.
This resource explains, that it should not block UI, but it does: https://learn.microsoft.com/lt-lt/ef/core/miscellaneous/async
I'm using (all are latest for .NET Core 3.1):
EF Core 3.1.12
Oracle.EntityFrameworkCore 3.19.80
Oracle.ManagedDataAccess.Core 2.19.101