Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section A.7. Chapter 4: Lesson Review Answers

A.7. Chapter 4: Lesson Review Answers

A.7.1. Lesson 1

1. Correct Answer: C
  1. Incorrect: The DataSet object is used with traditional ADO.NET.

  2. Incorrect: The SqlDataAdapter object is used with traditional ADO.NET.

  3. Correct: The DataContext object is the primary object for moving data when working with LINQ to SQL.

  4. Incorrect: Entity objects work with the DataContext object, but the DataContext object is the primary object used with LINQ to SQL.

2. Correct Answer: B
  1. Incorrect: Skip is an extension method that skips over elements you’ve already displayed.

  2. Correct: The Delay Loaded property indicates that you want lazy loading of the column.

  3. Incorrect: Take is an extension method that takes x elements from the sequence. It is used in conjunction with the Skip method to skip over elements that you’ve already displayed.

  4. Incorrect: The Auto Generated Value property indicates that this column automatically gets its value from the database.

A.7.2. Lesson 2

1. Correct Answer: C
  1. Incorrect: Contains checks for existence of an item, and Intersect gets items that two collections have in common.

  2. Incorrect: GroupBy performs group/aggregate operations, and Last returns the last item in the collection.

  3. Correct: Skip skips over previously used items, and Take retrieves another page of items.

  4. Incorrect: First retrieves the first item in the collection, and Last retrieves the last item in the collection.

2. Correct Answer: B
  1. Incorrect: The let keyword declares a range variable in your LINQ query.

  2. Correct: The equals keyword is used with the join keyword to specify the join criteria.

  3. Incorrect: The into keyword references the results of a join, group by, or select clause.

  4. Incorrect: The by keyword is used with the group keyword to specify the grouping criteria.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial