This course covers practical uses of Language Integrated Query (LINQ). With LINQ, you can search, sort, create, compare and analyze your data. And you can use LINQ to manipulate and shape your data for display in a user interface. With its common syntax, strong typing, Intellisense support, and transformational features, like the internet, you'll wonder how you ever coded without it. Enjoy!
LINQ By Example LINQ provides a very practical and useful set of features. Becomes with so many complex terms and related technologies, it may seem intimidating at first. Welcome to Module 2, of Practical LINQ. May name is Deborah Kurata and this module provides and introduction to LINQ and all of its related terminology by way of a set of LINQ examples. The examples are in C#, but everything can also be done in Visual Basic. See my blog, shown here on this slide, for LINQ examples in both C# and VB. Some subjects, such as yoga, are better understood by way of examples, instead of through complex vocabulary and detailed descriptions. Would you rather someone told you how to get into one of these yoga positions, or showed you? Well, maybe neither, but for LINQ the terms make so much more sense once you see how it works. So let's take deep cleansing breath --- and relax into some LINQ examples.
More LINQ Examples The prior module introduced LINQ and its related terminology, by way of a set of LINQ examples. But, it only covered a few of the many LINQ operators. Welcome to Module 3 of Practical LINQ. My name is Deborah Kurata and this demo intensive module, presents many more LINQ examples, including how to sort, create, compare, combine, and project data with LINQ. The examples are in C#, but everything can also be done in Visual Basic. See my blog, shown here on this slide, for LINQ examples in both C# and VB. This module provides many practical LINQ examples. We'll start simple and progressively get to more complex LINQ operators. First, we'll see how to order elements in a sequence and how to get nulls to sort what we want them. We'll use the LINQ range and repeat operators to generate a sequence. And we'll look at techniques for generating random sequences. We'll try out the LINQ interest and accept operators to compare sequences, and the concat, distinct, and union operators to combine sequences. Then, we'll crank up the difficulty and look at projections. A projection refers to the transformation of the items in a sequence to another type. We'll go through lots of examples using the LINQ select operator. And we'll introduce anonymous types. Lastly, we'll cover using both the LINQ select, and select many operators to work with parent/child data, also known as master detail data. So let's get started.
Data Binding The users of your application don't care how you store or retrieve the data, they only care if that data is displayed in an understandable, useful, and user friendly layout; hence the reason that LINQ is so helpful in your user interface layer. Welcome to Module 4 of Practical LINQ. My name is Deborah Kurata and this module demonstrates how to use the results of a LINQ query to bind data to your user interface elements. The examples are in C#, but everything can also be done in Visual Basic. See my blog, shown here on this slide, for LINQ examples that are in both C# and VB. Data binding is a technique for connecting a DataSource to controls on the user interface layer. When the DataSource changes, the controls display those changes. And when using an updateable DataSource, if the user changes the value in a control, the underlying DataSource changes. This is often referred to as two-way data binding. Since many applications use Windows Forms and those applications still need enhancements and modifications, the first example demonstrates binding in Windows Forms. If you are not using Windows Forms, you can skip to the second example. The second example uses Windows Presentation Foundation or WPF. The techniques used in that example demonstrate how to use binding with XAML. Those techniques are applicable also to Silverlight or Windows 8 XAML applications. Let's do some binding.