Course at a glance
Included in these subscriptions:
- Dev & IT Pro Video
- Dev & IT Pro Power Pack
Release date | 1/11/2012 | |
Level | Intermediate | |
Runtime | 10h 13m | |
Closed captioning | N/A | |
Transcript | N/A | |
eBooks / courseware | Included | |
Hands-on labs | Included | |
Sample code | Included | |
Exams | Included |
Course description
In this course, you will learn to use the Language Integrated Query (LINQ) to easily create complex data-independent queries. In addition, you will learn about the language features for Visual Basic in Visual Studio 2010 in order to make LINQ possible. You will start by working through a quick overview of LINQ, and how it applies to working with collections of objects, retrieving data stored in SQL Server, and creating XML content. Subsequent topics introduce new LINQ-oriented language features, LINQ to Objects, LINQ to DataSets, LINQ to SQL, LINQ to XML, and LINQ to Entities. By the time you have completed the course, you will have a good understanding of now only how to construct LINQ queries to work with data, but also how to use the features added to Visual Basic that support LINQ.
Prerequisites
This course assumes that students have familiarity with .NET in general, and with specifically with programming ADO.NET. The course makes no attempt to explain basic Visual Studio 2010 or .NET Framework concepts, and assumes that the student is at least familiar with all the concepts covered in the Introduction to Programming and Developing Applications with Visual Studio 2010 courses.
Meet the experts
Ken Getz is a featured instructor for several of our Visual Studio courses. He is a Visual Basic and Visual C# expert and has been recognized multiple times as a Microsoft MVP. Ken is a seasoned instructor, successful consultant, and the author or co-author of several best-selling books. He is a frequent speaker at technical conferences like Tech-Ed, VSLive, and DevConnections and he has written for several of the industry's most-respected publications including Visual Studio Magazine, CoDe Magazine, and MSDN Magazine.
Robert Green is a Visual Studio expert and a featured instructor for several of our Visual Basic and Visual C# courses. He is currently a Technical Evangelist in the Developer Platform and Evangelism (DPE) group at Microsoft. He has also worked for Microsoft on the Developer Tools marketing team and as Community Lead on the Visual Basic team. Robert has several years of consulting experience focused on developer training and is a frequent speaker at technology conferences including TechEd, VSLive, VSConnections, and Advisor Live.
Course outline
Module 1
LINQ Intro (49:02)
- Introduction (01:31)
- Data Access In the Past (01:01)
- Data Access APIs (01:09)
- Object/Relational Mapping (01:16)
- But Challenges Still Remain (01:01)
- LINQ (01:07)
- LINQ and Visual Basic/C# (01:11)
- LINQ and Language Features (00:39)
- LINQ to... (02:19)
- LINQ Overview (00:42)
- LINQ Providers (04:13)
- Structure of a LINQ Query (00:59)
- Three Stages (00:46)
- Demo: Numbers > 5 (04:24)
- The Data Source (00:21)
- XML as Data Source (00:33)
- SQL as Data Source (00:56)
- The Query (00:50)
- The Query Execution (00:50)
- Returning Multiple Values (01:10)
- Demo: Multiple Values (04:16)
- Using an Anonymous Type (01:32)
- Demo: Anonymous Type (05:10)
- Deferred Execution (00:59)
- Demo: Deferred Execution (05:42)
- Force Execution (01:00)
- Demo: Forcing Execution (02:41)
- Summary (00:28)
LINQ Examples (43:12)
- Introduction (00:41)
- LINQ to Objects (00:36)
- Demo: LINQ to Objects (04:10)
- Continuing the Investigation (01:06)
- Extenstion Methods (01:12)
- Demo: Extenstion Method (02:32)
- LINQ to Group Output (00:38)
- Demo: Grouping (02:55)
- LINQ to SQL (01:09)
- Linking a Class to SQL Server (00:20)
- Creating the Class (00:08)
- Marking Up the Class (00:30)
- Retrieving a Collection (01:06)
- Demo: Manually Retrieving Data (08:37)
- Anonymous Types (00:27)
- Demo: Anonymous Type (01:27)
- LINQ to XML (00:55)
- Life without LINQ to XML (00:26)
- Using System.Xml.Linq Classes (00:42)
- Creating Data (00:47)
- Demo: LINQ to XML (07:43)
- Visual Basic Only (00:29)
- Demo: XML Literals (03:40)
- Summary (00:42)
Module 2
Language Extensions (15:09)
- Introduction (00:32)
- LINQ and Languages (00:43)
- The Sample Application (00:48)
- Demo: Without New Features (04:11)
- Implict Type Delcarations (00:32)
- Demo: With New Features (03:05)
- Object Initializers (00:36)
- Constructors to the Rescue (00:45)
- Demo: Object Initializers (03:08)
- Summary (00:43)
Lambda Expressions And More (43:21)
- Introduction (00:33)
- Lambda Overview (01:14)
- Using Delegates (01:09)
- Demo: Delegates (03:07)
- Predicate Delegate Type (01:14)
- Demo: Predicate Delegate (03:46)
- Using Lambda Expressions (01:10)
- Demo: Lambda Expressions (05:23)
- Lambda and Delegates (00:53)
- Lambda and Sorting (00:45)
- Func Delegate Type (00:47)
- Demo: Func Declaration (03:42)
- Extension Methods (00:55)
- Creating Extension Methods (01:01)
- Demo: Extension Method (04:59)
- Chaining Operations (00:56)
- Demo: Chaining Operations (04:14)
- Extension vs. Built-In Methods (01:21)
- Anonymous Types (00:32)
- Demo: Anonymous Types (04:39)
- Summary (00:52)
Module 3
LINQ And Collections (23:58)
- Introduction (00:45)
- What Can You Query? (00:31)
- Arrays (00:14)
- Different Types of Objects (00:17)
- Arrays of Different Types (01:08)
- Using the Let Keyword (00:34)
- Using the OfType Method (01:40)
- Demo: Query an Array (03:29)
- Generic Lists (00:31)
- Extension Methods (00:27)
- Query Sytax vs. Functional (02:04)
- Generic Dictionaries (00:31)
- Demo: Lists and Dictionaries (04:39)
- Strings (00:25)
- Non-Generic Collections (01:46)
- Demo: Strings & Non-Generic (04:10)
- Summary (00:42)
LINQ Extension Methods (17:12)
- Introduction (01:10)
- Working with Data (00:52)
- Demo: Setup (03:05)
- Creating Sequences (00:26)
- Selecting Sequences (00:54)
- Retrieving a Single Element (02:43)
- Demo: Creating Sequences (01:32)
- Demo: Selecting Sequences (01:30)
- Demo: Single Elements (04:00)
- Summary (00:55)
More LINQ Extension Methods (37:08)
- Introduction (00:35)
- Filtering Sequences (01:10)
- Demo: Filtering (02:24)
- Ordering Sequences (00:31)
- Verifying Sequences (01:29)
- Demo: Ordering & Verifying (08:10)
- Converting Sequences (00:45)
- Positioning within Sequences (00:43)
- Demo: Converting & Positioning (06:16)
- Calculating Sequences (00:53)
- Demo: Calculating (04:07)
- More Complex Calculations (00:19)
- Sample Calculation (01:18)
- Demo: Aggregate Methods (04:31)
- Set Operations (00:47)
- Demo: Set Operations (02:31)
- Summary (00:31)
Module 4
Mapping Data To Objects (19:30)
- Introduction (01:10)
- LINQ to SQL (00:55)
- Mapping Data to Objects (01:12)
- DataContext Class (01:04)
- Entity Class (00:43)
- Relationships (01:50)
- Create an Object Model (00:52)
- Demo: O/R designer (11:18)
- Summary (00:23)
Querying Data (30:21)
- Introduction (00:25)
- Querying with LINQ to SQL (01:05)
- Generated SQL Statements (01:42)
- Simple Queries (01:23)
- Using Scaler Functions (00:59)
- Using Aggregate Functions (00:50)
- Demo: Simple Queries (10:46)
- Demo: Scaler Functions (01:02)
- Demo: Aggregate Functions (04:12)
- Querying Related Tables (02:00)
- Demo: Related Tables (05:32)
- Summary (00:20)
More Querying Data (23:47)
- Introduction (00:26)
- Lambda Expressions (01:15)
- Extension Methods (00:53)
- Demo: Lambda Expressions (04:04)
- Demo: Extension Methods (03:02)
- Grouping (00:50)
- Joins (01:28)
- Demo: Grouping (07:25)
- Demo: Joins (03:51)
- Summary (00:30)
Modifying Data (26:46)
- Introduction (00:35)
- Overview (01:32)
- Demo: Modifying Data (01:55)
- Demo: Add a Customer (03:28)
- Demo: Delete a Customer (03:36)
- Stored Procedures (01:05)
- Demo: Stored Procedures (08:39)
- Demo: Configure Behavior (04:03)
- Summary (01:50)
Module 5
LINQ to SQL Advanced Features (48:30)
- Introduction (00:42)
- Deferred Execution (00:49)
- Deferred Loading (02:45)
- Read Only Queries (00:37)
- Compiled Queries (00:46)
- Direct Execution of Queries (00:53)
- Demo: Deferred Loading (06:24)
- Demo: Compiled Queries (06:39)
- Transactions (02:07)
- Cascading Deletes (00:50)
- Tracking Changes (01:29)
- Creating Databases (01:27)
- Demo: Transactions (12:08)
- Data Validation (01:39)
- Demo: Data Validation (08:24)
- Summary (00:44)
LINQ to SQL Applications (28:06)
- Introduction (00:31)
- Overview (00:54)
- Web Application (00:28)
- LinqDataSource Control (01:19)
- Demo: Win App (13:51)
- Demo: Web App (10:19)
- Summary (00:41)
Module 6
Querying Data (35:26)
- Introduction (00:37)
- DataSets (01:39)
- Working with Data (01:23)
- LINQ to DataSet (01:00)
- Querying on DataSets (00:35)
- Untyped DataSets (01:53)
- Typed DataSets (01:04)
- Demo: Querying Data (18:48)
- Filter, Sort and Find (00:50)
- DataViews (00:38)
- Demo: DataViews (06:26)
- Summary (00:29)
Data Binding (21:50)
- Introduction (00:33)
- Overview (00:34)
- ToList (00:39)
- CopyToDataTable (00:54)
- AsDataView (01:04)
- Demo: Data Binding (17:39)
- Summary (00:22)
Module 7
Creating XML (34:32)
- Introduction (00:41)
- What About XML? (00:53)
- Visual Basic vs C# (01:34)
- Creating XML Content (00:34)
- Using XMLDocument (01:16)
- Demo: XMLDocument (01:57)
- XML Content Using LINQ (01:12)
- Demo: Creating XML (03:54)
- Traversing XML (00:35)
- New Methods (01:19)
- Demo: Traverse (03:25)
- Axis Methods (03:46)
- XML Expressions (00:50)
- Demo: Axis Operators (04:21)
- Updating XML Content (01:07)
- Demo: Updating Content (03:04)
- Verifying with Schema (01:24)
- Demo: Validating Schema (01:58)
- Summary (00:33)
Querying XML (29:32)
- Introduction (00:43)
- Querying XML Content (00:25)
- Demo: Query XML with LINQ (02:14)
- Anonymous Types (00:31)
- Demo: Anonymous Type (04:09)
- Extension Methods (00:51)
- Demo: The Any Method (02:33)
- Lambda Expressions (00:37)
- Demo: Lambda Expression (01:41)
- Transforming XML (00:52)
- Perfoming the Transformation (01:04)
- Demo: Transforming XML (04:08)
- Replacement Tokens (00:53)
- Demo: Replacements (07:47)
- Summary (00:57)
Module 8
Entity Data Model (23:43)
- Introduction (00:44)
- Entity Framework (00:40)
- Entity Data Model (03:24)
- Framework Components (01:21)
- ObjectContext Class (01:11)
- Entity Class (00:35)
- Relationships (01:04)
- Create an EDM (00:29)
- Demo: Create an EDM (13:12)
- Summary (01:00)
Querying Data (38:06)
- Introduction (00:24)
- Overview (00:37)
- Viewing SQL (00:56)
- Simple Queries (00:38)
- Scalar Functions (00:21)
- Aggregate Functions (00:24)
- Demo: Simple Queries (10:41)
- Related Entities (01:39)
- Lambda Expressions (01:01)
- Demo: Related Tables (10:52)
- Grouping (00:41)
- Joins (01:15)
- Demo: Grouping (04:24)
- Demo: Joins (03:26)
- Summary (00:40)
Modifing Data (23:43)
- Introduction (00:36)
- Overview (01:23)
- Demo: Modifying Data (01:53)
- Demo: Add a Customer (02:07)
- Demo: Delete a Customer (05:05)
- Stored Procedures (01:26)
- Demo: Stored Procedures (10:29)
- Summary (00:42)