I have next code
public async Task<IEnumerable<MyTabel>> GetData()
{
try
{
var dbCtx = new myEntities();
return await dbCtx.MyTabel.ToListAsync();
//return await dbCtx.MyTabel.ToArrayAsync();
}
catch (Exception ex)
{
throw ex;
}
}
I am wondering what is ToListAsync or ToArrayAsync method is better for perfomance ? does anyone know ?
Thanks.
UPDATE
for me performance is equal to less memory usage, faster query times, higher concurrency