In this post we will discuss what is difference between LoadQuery() and LoadDataQuery() in SharePoint 2010.
Also you can check out:
The Client Object Model has two load methods: Load() and LoadQuery().
Load method populates the client object directly with what it gets data from the server i.e. a collection object like ListItemCollection etc. But LoadQuery returns the data as a completely new collection in IEnumerable format.
The Collections that you load using the Load() method are eligible for garbage collection only when the client context variable itself goes out of scope where as, in these collections go out of scope at the end of IEnumerable list.
The Load() method does an in-place loading of the data returned from the server. All of the data returned from the server is stored and tracked inside of the ClientContext object. The ClientContext tracks the object IDs of the items and properties returned from the server.
The LoadQuery() method returns the results as new objects. These objects are not part of the ClientContext and a result can be easily managed and discarded when not needed any more.
var query = from list
where list.Hidden != false
var result = clientContext.LoadQuery(query);
var web = clientContext.get_web();
var lists = web.get_lists();