Hands-On Functional C#

Hands-On Functional C#
Hands-On Functional C#

English | MP4 | AVC 1920×1080 | AAC 48KHz 2ch | 2h 43m | 544 MB
eLearning | Skill level: All Levels


Get a new perspective on C# code using the Functional Programming approach. Write better C# code with practical examples

When C# programs get more complex, they become hard to understand, and as a result are much harder to maintain. We suggest a few approaches from Functional Programming to resolve this and make the code readable, reusable, testable and structured.

This course will present some basic Functional Programming ideas and suggest how to make use of the functional features of C# in your everyday work. As C# is deeply object-oriented by design, we’ll concentrate on the bits of Functional Programming that are easily applicable to it—such as LINQ, pure functions, and dot-chaining (aka composability). We won’t explore functional terms such as monads and functors in too much detail; rather we provide examples of real C# using functional features. You’ll improve the maintainability and testability of your application and gain the confidence to start a new project with Functional Programming paradigms.

A comprehensive course packed with practical examples and helpful advice on getting started with exploring different Functional Programming features in C#. This course is divided into clear chunks so you can learn at your own pace and focus on your own area of interest.

What You Will Learn

  • Make your C# code more concise using Functional Programming
  • Use functional syntax in C# to unravel problems which are hard to solve using pure object-oriented techniques
  • Work with the features of IEnumerable to reduce code complexity
  • Build your own extensions for LINQ so you have full control over your business logic
  • Explore pure functions and avoid side-effects to keep your code readable
  • Include Functional Programming as a valuable tool in your toolbox as the best approach to any programming challenge.
+ Table of Contents

Getting to Grips with Functional C#
1 The Course Overview
2 Features of Functional Programming in C#
3 Presenting the Books App
4 Installation of Visual Studio Community Edition

Refactor the ‘for’ Loop
5 The ‘for’ loop
6 Defining the Pain Points of Using ‘for’ Loop
7 Creating Your First IEnumerable
8 Refactoring the ‘for’ Loop Using ‘foreach’

Using LINQ
9 Creating Your First LINQ Expression
10 Lazy LINQ
11 Implement Search by Title
12 Closures and LINQ Pitfall

Extending LINQ
13 LINQ with a Plain Old Method
14 LINQ Extension Method
15 Port a Method to LINQ Extension

Clean Code with Pure Functions
16 Pure Functions
17 Implement Recommend Book
18 Refactor Global State Out
19 Implement Select Book

Isolating the Side Effects
20 Implement Delete Book
21 Implement Add Book
22 Push Side Effects Out

Putting the Application Together
23 Writing Your First Unit Test
24 Testing Pure Functions
25 Dependency Injection
26 Summary