please tell me What is difference between ToList() & AsQueryable() ?
see the code with AsQueryable()
- var source = (from customer in _context.CustomerTBs.
- OrderBy(a => a.Country)
- select customer).AsQueryable();
tell me when above code will execute then records will be fetch from db or not ?
- var source = (from customer in _context.CustomerTBs.
- OrderBy(a => a.Country)
- select customer).ToList();
when to use AsQueryable() and when to use ToList() ?
looking for answer in details. thanks