Code like a Pro in C#, Video Edition

Code like a Pro in C#, Video Edition

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 83 Lessons (11h 54m) | 3.91 GB

Build on your existing programming skills and upskill to professional-level C# programming.

  • In Code Like A Pro in C# you will learn:
  • Unit testing and test-driven development
  • Refactor a legacy .NET codebase
  • Principles of clean code
  • Essential backend architecture skills
  • Query and manipulate databases with LINQ and Entity Framework Core

Critical business applications worldwide are written in the versatile C# language and the powerful .NET platform, running on desktops, cloud systems, and Windows or Linux servers. Code Like a Pro in C# makes it easy to turn your existing abilities in C# or another OO language (such as Java) into practical C# mastery. There’s no “Hello World” or Computer Science 101 basics—you’ll learn by refactoring an out-of-date legacy codebase, using new techniques, tools, and best practices to bring it up to modern C# standards.

You know the basics, now get ready for the next step! Pro-quality C# code is efficient, clean, and fast. Whether you’re building user-facing business applications or writing data-intensive backend services, the experience-based, practical techniques in this book will take your C# skills to a new level.

Code Like a Pro in C# teaches you to how write clean C# code that’s suitable for enterprise applications. In this book, you’ll refactor a legacy codebase by applying modern C# techniques. You’ll explore tools like Entity Framework Core, design techniques like dependency injection, and key practices like testing and clean coding. It’s a perfect path to upgrade your existing C# skills or shift from another OO language into C# and the .NET ecosystem.

Table of Contents

1 Part 1. Using C# and .NET
2 Introducing C# and .NET
3 Reason 2 – C# is maintainable
4 Why not work in C#
5 Switching to C#
6 What you will learn in this book
7 .NET and how it compiles
8 How CLI-compliant languages are compiled
9 Step 2 – Common Intermediate Language (assembly level), Part 1
10 Step 2 – Common Intermediate Language (assembly level), Part 2
11 Step 3 – Native code (processor level)
12 Part 2. The existing codebase
13 How bad is this code
14 Coming to terms with the existing codebase
15 The existing codebase – Web service configuration files
16 Considering models and views in the existing codebase, Part 1
17 Considering models and views in the existing codebase, Part 2
18 Manage your unmanaged resources!
19 Collecting flight information with collections
20 Querying a database with SqlCommand
21 The FlightController – Assessing GET flight {flightNumber}
22 The FlightController – DELETE flight {flightNumber}
23 Part 3. The database access layer
24 Setting up a project and database with Entity Framework Core
25 Setting up and configuring a web service
26 Implementing the Startup class
27 Implementing the database access layer
28 Configuration methods and environment variables
29 Part 4. The repository layer
30 Test-driven development and dependency injection
31 The CreateCustomer method
32 Validating against invalid characters
33 Object initializers and autogenerated code
34 Locks, mutexes, and semaphores
35 Controlling dependencies with dependency injection, Part 1
36 Controlling dependencies with dependency injection, Part 2
37 Comparing objects
38 Custom exceptions, LINQ, and extension methods
39 Congruence – From the Middle Ages to C#
40 Creating a “comparer” class using EqualityComparer T
41 Testing equality by overriding the Equals method
42 Overloading the equality operator
43 Stubbing, generics, and coupling
44 Input validation, separation of concerns, and coupling
45 Using object initializers
46 Programming with generics
47 Conditionals, Func, switches, and switch expressions
48 Querying for pending changes in Entity Framework Core
49 Extension methods, streams, and abstract classes
50 Validating the AirportID input parameter
51 Querying the database for an Airport object, Part 1
52 Querying the database for an Airport object, Part 2
53 Implementing the Flight repository
54 The IsPositive extension method and “magic numbers”
55 Getting a flight out of the database
56 Part 5. The service layer
57 Reflection and mocks
58 Implementing the CustomerService
59 Implementing the BookingService
60 Unit testing across architectural layers
61 Mocking a class with the Moq library, Part 1
62 Mocking a class with the Moq library, Part 2
63 Calling a repository from a service
64 Runtime type checking revisited and error handling
65 Cleaning up the BookingServiceTests class
66 Calling the Flight repository from a service class, Part 1
67 Calling the Flight repository from a service class, Part 2
68 Using IAsyncEnumerable T and yield return
69 Chapter 12.Combining two data streams into a view
70 Using the yield return keywords with try-catch code blocks
71 Implementing GetFlightByFlightNumber
72 Part 6. The controller layer
73 Middleware, HTTP routing, and HTTP responses
74 Returning HTTP responses with the IActionResult interface (GetFlights)
75 Injecting dependencies into a controller using middleware
76 Implementing the GET Flight {FlightNumber} endpoint
77 Routing HTTP requests to controllers and methods
78 JSON serialization deserialization and custom model binding
79 Using the [FromBody] attribute to deserialize incoming HTTP data
80 Implementing the CreateBooking endpoint method logic
81 Acceptance testing and Swagger middleware
82 Generating an OpenAPI specification at runtime
83 Appendix B. Clean code checklist