Complete Practical LINQ Tutorial in C#

Video description

A hands-on course walking you through the different parts of LINQ framework.

About This Video

  • Understand all the LINQ operations
  • Filtering, ordering, and projecting with LINQ
  • Aggregating with LINQ

In Detail

Extension methods were introduced in C# 3 and since then have become an indispensable part of the .NET platform. This enormously powerful feature has allowed us to build a whole framework built upon it called LINQ or Language Integrated Query. I’ve seen many code bases that avoid using LINQ and rely on the old procedural style of programming. If you still feel yourself uncomfortable with LINQ or you want to improve your understanding of LINQ, then this course is for you. As you might know, LINQ was inspired by functional paradigm and F# in particular. So, this course is not only about LINQ but about the fundamentals of functional programming as well.

This course covers:

  • The basics of LINQ: extension methods, the idea of pipelining, IEnumerable, implementing our own extension, query syntax, pitfalls of LINQ operations, how to alter a list
  • Generating data streams: Enumerable class and its main operations, implementing your own extension which generates a stream of data
  • Filtering, ordering, projecting: parsing a CSV file, then, First, Last, Single, TakeWhile, SkipWhile, Any, All, Contains, SequenceEqual, Select and SelectMany
  • Joining, grouping, aggregating: Join, Group, GroupJoin, Zip, Sum, Average, Min, Max
  • Conversions: OfType, Cast, ToArray, ToList, ToDictionary, ToLookup, AsEnumerable, AsQueryable
  • LINQ to XML: overview, generating XML from a collection, reading XML
  • EF and LINQ: expression trees, inserting into and reading from a database
  • Extendibility in C#: what is functional programming (FP), purity and side effects, extending IDisposable, general-purpose extensions, extending StringBuilder, Primitive Obsession

Enroll now and start learning LINQ and the fundamentals of functional programming.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Introduction to LINQ
    1. Outline 00:01:01
    2. LINQ Intro 00:01:53
    3. Extension Methods 00:07:20
    4. Pipelining 00:02:27
    5. Why LINQ? 00:06:32
    6. The role of IEnumerable 00:03:16
    7. Implementing our own LINQ Extensions 00:05:26
    8. Parsing a CSV-file 00:06:01
    9. Named Methods vs Anonymous Methods vs Lambda 00:03:51
    10. Query Syntax 00:03:21
    11. Yield Return 00:06:07
    12. LINQ. Deferred Execution 00:03:22
    13. Exceptions and Deferred Execution 00:01:49
    14. LINQ. Closures with for and foreach loops 00:05:01
    15. Multiple Enumeration Pitfall 00:06:58
    16. Altering Lists 00:07:10
    17. Conclusion 00:02:21
  2. Chapter 2 : Generating Data Streams
    1. Outline 00:00:29
    2. Empty, Range, Repeat 00:02:11
    3. Custom Generator 00:02:26
    4. Conclusion 00:00:38
  3. Chapter 3 : Filtering, Ordering, Projecting
    1. Outline 00:00:53
    2. Select 00:05:18
    3. Where 00:03:23
    4. ThenBy 00:01:54
    5. First, Last, Single, OrDefault 00:06:43
    6. TakeWhile, SkipWhile 00:03:50
    7. SequenceEqual 00:02:59
    8. Distinct 00:05:37
    9. Any, All, Contains 00:04:50
    10. SelectMany 00:03:28
    11. ElementAt and Counting 00:03:43
    12. Conclusion 00:02:22
  4. Chapter 4 : Joining, Grouping, Aggregating
    1. Outline 00:00:43
    2. Join 00:04:06
    3. GroupBy 00:05:31
    4. GroupJoin 00:04:16
    5. Zip 00:02:38
    6. Min, Max, Sum, Average 00:03:22
    7. Concat and Union 00:05:28
    8. Intersect and Except 00:02:53
    9. Conclusion 00:01:21
  5. Chapter 5 : Conversions
    1. Outline 00:00:42
    2. OfType and Cast 00:02:16
    3. ToArray, ToList, ToDictionary, ToLookup 00:08:02
    4. Pitfalls of Conversion 00:05:09
    5. Conclusion 00:01:25
  6. Chapter 6 : LINQ TO XML
    1. Outline 00:00:35
    2. XML Document Structure 00:01:46
    3. Creating XML from a Collection 00:05:04
    4. Refactoring Code 00:03:20
    5. Reading XML 00:05:44
    6. Conclusion 00:00:50
  7. Chapter 7 : LINQ to Entities
    1. Outline 00:00:29
    2. Preparing Project 00:03:57
    3. Inserting and Reading 00:03:18
    4. Pitfalls of LINQ to Entities 00:04:17
    5. Expressions, AsEnumerable and AsQueryable 00:11:16
    6. Conclusion 00:01:03
  8. Chapter 8 : Extendibility in C#
    1. Outline 00:01:53
    2. Defining Functional Programming 00:03:30
    3. Functions, Functions, and Functions Again 00:02:43
    4. Why Functional Programming 00:02:31
    5. Immutability 00:06:59
    6. Purity and Side Effects 00:08:32
    7. Extending IDisposable 00:09:16
    8. General Extensions 00:10:23
    9. Extending StringBuilder 00:10:34
    10. Primitive Obsession 00:07:37
    11. Conclusion 00:01:57

Product information

  • Title: Complete Practical LINQ Tutorial in C#
  • Author(s): Ilya Fofanov
  • Release date: December 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781800201255