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 a
ToListAsync
You are not "awaiting a method". You are awaiting a Task, which is an awaitable.
Task
You call getAllScanEmailTo that returns an IQueryable on which you then call ToListAsync which returns the Task> you are awaiting.
getAllScanEmailTo
IQueryable
Task>