70-573 · Question #102
You create a Microsoft .NET Framework console application that uses a Representational State Transfer (REST) API to query a custom list named Products. The application contains the following code…
The correct answer is A. code.Products.ToList. MNEMONIC RULE: "read all items ToList" Interacting with SharePoint 2010 lists using REST, ASP.NET and ADO.NET Data Services Enumerable.ToList<TSource> Method
Question
You create a Microsoft .NET Framework console application that uses a Representational State Transfer (REST) API to query a custom list named Products. The application contains the following code segment. AdventureWorksDataContext codc = new AdventureWorksDataContext(new codc.Credentials = CredentialCache.DefaultCredentials; You need to read all items in Products into an object. Which method should you use?
Options
- Acode.Products.ToList
- Bcode.Products.All
- Ccode.Products.AsQueryable
- Dcode.Products.ElementAt
How the community answered
(18 responses)- A83% (15)
- B11% (2)
- D6% (1)
Explanation
MNEMONIC RULE: "read all items ToList" Interacting with SharePoint 2010 lists using REST, ASP.NET and ADO.NET Data Services Enumerable.ToList<TSource> Method
Topics
Community Discussion
No community discussion yet for this question.