Is it correct if i am using await + ToListAsync() over IQueryable which is not define as a task
问题 I am using asp.net MVC-5 with EF-6, and I am not sure if using await + ToListAsync is valid. For example, I have the following repository method which returns an IQueryable :- public IQueryable<TSet> getAllScanEmailTo() { return t.TSets.Where(a=>a.Name.StartsWith("ScanEmail")); } And I am calling it as follow:- var emailsTo = await repository.getAllScanEmailTo().ToListAsync(); In the beginning, I thought I will get an error because I am using "await" a method which is not defined as a task,