LINQ With C#

FunctionX Tutorials

1 - INTRODUCTION TO THE LINQ

Fundamentals of the Language Integrated Query

Querying an array and sorting the results

This lesson serves as an introduction the the Language Integrated Query or LINQ. We start with querying arrays. This lesson also introduces nesting, which is the ability to embed one query into another. Finally, the lesson introduces the topic of sorting a query, which consists of odering the values produced by a query.


2 - INTRODUCTION TO CRITERIA

Fundamentals of setting a condition in a query

Using the fundamental keywords to conditionally select records

This lesson introduces the keywords that are necessary to select records used to build a query. While the keywords from, in, select, orderby, ascending, and descending were introduced in the previous lesson, here we learn to use the where keyword and its effects on the results of a query statement.


3 - INTRODUCTION TO BUILT-IN CLASSES

Built-In Classes/Structures

Exploring .NET built-in classes to build a query

Some of the .NET available classes and structures can be used directly in to a query. A few of those classes are used in this lesson, namely the ability to access some of their properties and methods to perform various types of operations. The string and the char types, the DateOnly, the TimeOnly, and the DateTime structures are reviewed.


4 - CONJUNCTIONS AND DISJUNCTIONS

Logical Conjunctions and Disjunctions

A review of the ability to combine conditions for a query

The ability to combine conditions makes it possible to evaluate whether one of those conditions is true or false. Normally, the conjuctions and disjunction operations are formulated as done in C#. In this lesson, we learn how to perform those validations in a query. In this lesson also, the operators used for conjunctions and disjunctions are reviewed.


5 - THE .NET FRAMEWORK SUPPORT FOR LINQ

Introduction to the .NET Framework Support

Introduction to classes at the foundation of the LINQ

Finally, the interfaces and classes that lead the language integrated query are introduced here. These include the Enumerable class, the regular IEnumerable and IQueryable interfaces, and the generic IEnumerabler<> interface. The ability to convert the results of a query to an array, to a list, or to a dictionary are also mentioned.


6 - INTRODUCTION TO CLASSES/RECORDS/STRUCTURES

Introduction to Classes, Records, and Structures

Creating a custom class and involving it in a query

In previous lessons, queries are created from arrays of primitive values. In this lesson, we learn to create queries using objects from our own classes, records, and structures. After creating a class/record/structure by adding the members (properties and methods) we judge necessary, we learn to make query selections from those members by accessing a property or calling a method.


7 - THE LET AND NEW KEYWORDS

Letting New Values

Some additional keywords to construct a query

The language integrated query includes some interesting keywords that can be used to create query objects that resemble object-oriented programming, which is the ability to create classes. To support this aspect, the LINQ provides the let keyword and its support for the new operator.


8 - RECORDS JUNCTIONS

Joining Records

Joining, cross joining, inner joining, and outer joining records

One of the complex operations performed in a query is to join record, whether those records are related or not. This is a valuable aspect of data analysis. The LINQ supports various ways to join records using operators such as join and equals, and also the Enumerable.DefaultIfEmpty() method. In reality, there are different ways the keywords are mixed to get the desired query results.


9 - BUILT-IN CLASSES OPERATIONS

.NET Support for Query Operations

A detailed review of query operations supported by .NET built-in classes

In a previous lesson, we were introduced to the .NET classes and interfaces that lead the language integrated query, but we didn't review their contents. Well, the classes and interfaces that serve for the foundation of the LINQ are equipped with various methods for diffent types of operations.

FunctionX

This site provides various types of tutorials and lessons on application use, programming, and application design.

FunctionX Tuturials

.NET Graphics

LINQ

F# (Console)

Python

Microsoft Visual C#

Microsoft Access

VBA Access

HTML

Cascading Style Sheet

JavaScript

PHP