So I have a main sync query like:
private List<MyCustomClass> Foo()
{
return _ctx.Table1.Where(...).Select(s => new MyCustomClass { ... }).ToList();
}
and I need to use the results of it in a sync query:
1. return Foo().Where(...).GroupBy(...).Select(s => new MyCustomClass2 { ... }).ToList();
AND ALSO in an async query:
2. return await Foo().Where(...).GroupBy(...).Select(s => new MyCustomClass3 { ... }).ToListAsync();
cause I need to filter the main query results for other fields and then group by and get other informations.
The (1) query does work but the (2) query does not (it doesn’t even show .ToListAsync()).
I would like to leave both doors open.
I already try to add AsQueryable() to the main query but it doesn’t work.
Someone could help me?
Thanks a lot.
1