TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Tridip Bhattacharjee
NA
1.2k
77.1k
What is difference between ToList() & AsQueryable()
Mar 15 2018 3:23 AM
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
Reply
Answers (
5
)
How to get child node info from xml file
Converting Sql Query to Linq