When attempting to execute procedure asynchronously
public async Task<ActionResult> Index()
{
Stopwatch watch = new Stopwatch();
watch.Start();
ContentManagement service = new ContentManagement();
var contentTask = service.MesesAsync();
var content = await contentTask;
watch.Stop();
ViewBag.WatchMilliseconds = watch.ElapsedMilliseconds;
return View("Index");
}
public async Task<List<SP_MESES_BUSCA_Result>> MesesAsync()
{
var ListarMes = await db.SP_MESES_BUSCA().ToList();
return ListarMes;
}
Returns the error:
Can not await 'System.Collections.Generic.List'