Section 4.4 LINQ – Microsoft Language-Integrated Query
Learning Objectives
After you have completed this section, you should be able to
- explain the fundamental concepts of LINQ.
- prepare to use databases in ASP.NET with C# or VB web applications.
Activities
- Carefully read the learning objectives.
- Watch the related section of the presentation for Chapter 18;
- Read sections 18.6, Microsoft Language Integrate Query (LINQ)through18.9, Dynamically Binding LINQ to SQL Query Results of Chapter 18.
- Find answers to the study questions below.
- Try to work through the Figure 18.36 example in Deitel, especially if you choose to do Assignment 3A.
Study Questions
- What is LINQ?
- What are the differences between SQL and LINQ?
- What can you do using LINQ to SQL classes?
- With LINQ, how do you query an array of int values?
- In a LINQ query, what does the FROM clause do?
- In a LINQ query, what does the WHERE clause do?
- In a LINQ query, what does the SELECT clause do?
- In LINQ, how do you iterate through the results of a LINQ query with a foreach statement?
- In a LINQ query, what does the ORDERBY clause do ?
- What are implicitly typed local variables?
- With LINQ, how do you query an array of objects?
- In LINQ, how do you sort of the result of a LINQ query?
- With LINQ, how do you query a generic collection?
- What is “LINQ to SQL”?
- How do you use LINQ to access data in SQL server databases?
- How do you query a database with LINQ?
- How do bind data between (web) controls and the LINQ to SQL classes?
- How do you bind (web) controls to LINQ to SQL query results dynamically?
Summary
Read the Chapter 18 summary.