
Explore the basics of LINQ, extension methods, and pipelining; learn to implement your own extension method, compare named, anonymous, and lambda expressions, and understand deferred execution and query syntax.
explore the linq intro in c# 3, a language-integrated query framework. write linq queries in projects created with visual studio templates to access data from in-memory objects and various sources.
Explore how extension methods add functions to existing types using a static class and the this keyword, enabling flexible, noninvasive enhancements such as extending date time for specific formats.
Compare procedural and functional code in C# using linq to find the five largest files in a directory, filtered by last write time, and display their name and size.
Explore how IEnumerable abstracts collection iteration, exposing GetEnumerator that returns an IEnumerator with MoveNext, Current, and Reset, enabling foreach and query operations over arrays and other collections.
Implement your own extension methods for IEnumerable, replacing foreach loops with filter and for each extension inside a public static class, using a predicate to drive selection and execution.
Parse a csv file to create a chessplayer collection, using split and trim, then apply linq to filter by birth year, order by descending rating, and display top 10.
Explore named, anonymous, and lambda methods for filtering with LINQ in C#, using a ratings over 2700 example; prefer concise lambdas for simple cases and separate methods for complex logic.
Explore the query syntax in LINQ, using from, where, order by, and select to filter and sort a collection, and compare it with method-chains.
Compare the filter method with the built-in where in LINQ, and explain how yield return enables deferred execution when iterating an IEnumerable of players.
Demonstrate LINQ deferred execution, showing that where filters run only when a terminal operation executes, and how removing items before the terminal call alters results, with performance and memory benefits.
Explore how deferred execution in LINQ postpones exceptions until enumeration, showing an invalid operation exception when accessing a property inside a foreach loop and the need for try-catch around iteration.
Explore how closures with for and foreach loops in LINQ can throw a boundary exception, and how a temporal variable fixes it; compiler versions affect the second loop's output.
avoid the multiple enumeration pitfall by materializing the query once with toList, understanding deferred execution of the where operator, and using IList or IReadOnlyCollection to prevent repeated enumeration.
Learn patterns for altering a list in C# with for loops, backward iteration, and remove all using a lambda expression, plus using a separate list via LINQ to filter items.
Master language integrated query in C# by using LINQ concepts like extension methods, piping and chaining, and the IEnumerable interface, with emphasis on deferred execution and lambdas.
Explore data stream generation operations such as arr and repeat, and examine enumerable.empty, while implementing your own generator of random numbers.
Generate data streams in C# with range and repeat to start from a number and produce values, then foreach them; return an empty sequence with the empty method.
Create a custom generator in C# by writing an extension method that yields a random double stream with LINQ, filters values above 0.7, takes five, and rounds them.
Explore how to generate sequences with the range method, the repeat method, and your own generators using yield return. Learn to filter, order, and project data sequences.
Explore filtering, ordering, and projecting data with LINQ operations, including select, order by, take while, skip while, any, all, contains, sequence equal, and select many.
Discover how the select operator projects a data sequence in C# and Linq, transforming inputs into new shapes, including anonymous types and concatenated names, while preserving record count.
Discover how the where operator filters input with a predicate, excluding unwanted elements, using examples of names longer than three characters and a lambda expression.
Learn to filter, sort, and project with LINQ's select and where methods, then apply multi-property ordering with then by and paginate using take.
Use linq's first, last, single, and default operators to select items with predicates, and learn how first or default and last or default handle missing matches and exceptions.
Learn to compare two collections with sequence equal, test by duplicating parsing, and implement an equality comparer to compare by elements, then pass it to sequence equal to confirm equality.
Discover how the distinct operator filters sequences to unique items, from string characters to custom objects using a rating-based comparer, with a chess player example.
Flatten nested data with LINQ's SelectMany operator to turn a collection of lists into a single sequence, selecting names and phone numbers and printing joined data.
Master count, long count, and element at in C# linq. Learn to count items, handle large collections, and access by index with predicates.
Explore how the select operator projects data, orders by ascending or descending (then by), uses first, last, single, and defaults, plus take, take while, contains, any, all, and select many.
Discover how to join collections and group them using a group join. Learn to join two collections and understand mean maximum leverage in these operations.
Join demonstrates using the join operator to combine players and tournaments by player id, producing a joined data set with last name, rating, tournament title, date, and country.
Use LINQ group by to cluster items by country and order groups by the country key in descending order, then iterate each group to access its players.
Explore group join to fuse teams and players by team name, then group players by teams, displaying each team's country and its players.
Demonstrate using the zip operator in C# LINQ to join two collections string by string without a key, creating an anonymous type with player name, team name, and country.
Learn min, max, average, and sum aggregations in linq to analyze a top 10 players dataset. Compute the lowest and highest ratings and the average.
Explore how concat and union operators combine collections; concat appends one sequence to another, while union returns unique items, optionally using a custom equality comparer.
Learn to use LINQ intersect and except on two product lists to find common items and items unique to the first list. The demo covers comparers and case differences.
Explore joining collections with join and zip, and use group by for one-to-many relationships. Learn how group join combines grouping with joining in one step.
Explore type and cast operations to convert items between types, learn how to convert to list, array, and dictionary, and inspect Enumerable and casting pitfalls within collections.
Compare how OfType filters elements by type and how Cast converts them, highlighting when invalid cast exceptions occur and how results can be materialized with a simple array demo.
Convert collections with ToList, ToArray, ToDictionary, and ToLookup, build dictionaries from unique keys like IDs, and use lookups to group items efficiently by namespace or key.
Explore pitfalls when converting a list of integers to doubles in C#, comparing extension methods, cast, and query syntax. Learn how dynamic typing with the DLR resolves runtime type issues.
Learn how to convert collections to list, to array, or to dictionary with a unique key, then group items by a key and access them efficiently.
Map the ex-im document structure to axolotl classes, parse the file, and generate an example document from a collection. Read the ex-im file and avoid common pitfalls with sml dates.
Explore the xml document structure by using the x document class to create and read xml documents, including x declaration, x element, x attribute, and x node api.
Convert a file-based collection to xml by parsing lines, projecting to players, and building an xml document with id, first name, last name, birth year, and country.
Refactor a collection-to-xml transformation by replacing elements with attributes and using LINQ to project records, removing loops, and producing cleaner, faster, more concise XML.
Read xml with linq to xml, load data for large files, read a stream, cast rating to int and compare to 2700, and ensure safety with null propagation and coalescing.
Learn that x document is a container for data, with element nodes and attributes, enabling loading and saving x XML data using null propagation and coalescing to avoid reference exceptions.
Establish a connection to a school database, insert and retrieve data, and explore pitfalls and expression tree in the anti-Tea framework.
Prepare the project by wiring up Entity Framework with SQL Server, install EF 6.2, define a ChessPlayers DbSet in a DbContext, and insert and query data.
Insert data with Entity Framework and linq by reading a file, parsing to chess players, saving changes, and querying players by rating with sql server generated queries.
Identify LINQ to Entities pitfalls, such as inefficient sequencing of take and to list and the use of unsupported operators like contains, which can throw exceptions and degrade SQL performance.
Explore how expressions drive both local enumerable queries and remote queryable sources, using expression trees, lambdas, and AsEnumerable and AsQueryable to control translation to SQL and in-memory execution.
Explore using linked to entities in entity framework to insert and retrieve data like regular objects, while monitoring for LINQ to SQL translation causing performance issues.
Explore practical functional programming in C# with a focus on immutability, purity, and side effects, and learn to extend disposable interfaces and general extensions to compose objects.
Define functional programming as a declarative paradigm that treats computation as evaluating mathematical functions and avoids changing state, yielding independent functions dependent only on inputs for predictable, maintainable code.
Examine how functional programming treats functions as first-class citizens, and how single responsibility principle and other SOLID principles map to FP through strategy, abstract factory, decorator, and visitor patterns.
Explore why functional programming concepts boost code simplicity, composability, and concurrency safety, even without a fully functional language, by embracing immutability and side-effect free design.
Explain immutability as avoiding state changes in functional programming, contrast mutable and immutable objects using a character class and a rectangle, and show how returning new instances improves readability.
Explore purity and side effects in programming, distinguishing observable state changes from pure functions. Learn how exceptions, logs, and internal state mutation affect purity and when side effects are acceptable.
Explore extending IDisposable in C# by wrapping using blocks with functional composition, implementing a factory method for data parsing, and building safe, readable pipelines for CSV parsing.
Explore general extensions in C# to thread intermediate results through fluent call chains, convert between types with mapper functions, and apply predicates to control processing in a readable, functional style.
Refactor procedural string builder code by using extension methods to simplify append format and append line, and adopt string interpolation after C# 6 for clarity.
Address primitive obsession by showing decimal is not money and extension methods can pollute domain logic. Use a money struct as a value object to encapsulate currency and safe arithmetic.
Summarizes functional programming basics, immutability, and pure versus impure functions, with declarative concepts and the benefits of predictable, testable code in C# extensions such as string builder and stream reader.
Extension methods were introduced in C# 3 and since then became an indispensable part of the .NET platform. That enormously powerful feature allowed to build a whole framework built upon it called LINQ or Language Integrated Query. I’ve seen many code bases which avoid using LINQ and rely on 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, ThenBy, 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
In short, this is a great course, so enroll right now and start learning LINQ and the fundamentals of functional programming.