What is the difference between ToListAsync()
and ToList()
?
As in the example below, what is the difference between one and the other?
using Modelo.Classes.Contexto;
using System.Data.Entity;
using System.Linq;
namespace AppConsoleTestes
{
class Program
{
static void Main(string[] args)
{
using (var ctx = new dbContexto())
{
var ListaUsuario1 = ctx.Usuarios.ToListAsync();
var ListaUsuario2 = ctx.Usuarios.ToList();
}
}
}
}