PrepAway - Latest Free Exam Questions & Answers

Which method should you use?

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. Dim codc As New AdventureWorksDataContext(New
Uri(“http://contoso/_vti_bin/listdata.svc”)) codc.Credentials = CredentialCache.DefaultCredentials

You need to read all items in Products into an object. Which method should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
codc.Products.AsQueryable

B.
codc.Products.ElementAt

C.
codc.Products.All

D.
codc.Products.ToList


Leave a Reply