liveBook · Manning

What you will learn in .NET in Action, Second Edition

by Dustin Metzgar

Chapter by chapter

Chapter 1: Why .NET?

1.1 What is .NET? · 1.2 Where is .NET used? · 1.2.1 .NET in gaming and 3D graphics · 1.2.2 Popular .NET open source projects · 1.3 When to use .NET · 1.4 What will I learn from this book? · 1.5 What is in the .NET runtime? · 1.5.1 Intermediate language · 1.5.2 JIT compilation · 1.5.3 Garbage collection · 1.6 Summary

What you learn in chapter 1 →

Chapter 2: Building a console application

2.1 Creating new applications from templates · 2.2 Building and running · 2.3 Writing code · 2.4 Namespaces and conventions · 2.5 Global using statements · 2.6 Static using statements · 2.7 Handling more command-line arguments · 2.8 C# properties · 2.8.1 Reflection · 2.8.2 Interpolated strings · 2.8.3 Null operators · 2.8.4 Casting objects to types · 2.9 Summary

What you learn in chapter 2 →

Chapter 3: Creating web ser vices and applications with ASP.NET Core

3.1 Web services · 3.1.1 Adding a service that responds with a collection of data · 3.1.2 Controlling the response · 3.2 Web applications · 3.2.1 Razor pages · 3.2.2 Code-behind · 3.3 Summary

What you learn in chapter 3 →

Chapter 4: File and network I/O

4.1 Reading and writing files · 4.1.1 Building a custom template · 4.1.2 Finding files in folders · 4.1.3 Finding text in a file · 4.1.4 Disposing the StreamReader with using · 4.1.5 Parsing command-line arguments · 4.2 Working with JSON · 4.2.1 Reading JSON documents · 4.2.2 Writing JSON documents · 4.2.3 JSON serialization · 4.3 Making HTTP requests · 4.4 Unblocking programs with asynchronous programming · 4.5 Summary

What you learn in chapter 4 →

Chapter 5: Using Entity Framework Core with relational databases

5.1 Storing application data · 5.2 Building your first EF Core application · 5.2.1 Object-creation shorthand · 5.2.2 Cleaning up the compiler warnings · 5.2.3 Creating a relationship · 5.3 Accessing data asynchronously · 5.4 Using EF Core with ASP.NET Core · 5.4.1 Request methods · 5.5 Exposing your API via Swagger/OpenAPI · 5.6 Summary

What you learn in chapter 5 →

Chapter 6: Unit-testing fundamentals

6.1 Writing code that’s easier to test · 6.2 SOLID principles · 6.2.1 S: Single responsibility principle · 6.2.2 O: Open/closed principle · 6.2.3 L: Liskov substitution principle · 6.2.4 I: Interface segregation principle · 6.2.5 D: Dependency inversion principle · 6.3 An example test application: Sodoku · 6.4 Building your first xUnit test project · 6.5 Fact tests · 6.6 Theory tests · 6.6.1 Applying SOLID principles to SudokuSolver · 6.6.2 Testing for exceptions · 6.6.3 Theory testing with MemberData · 6.7 Summary

What you learn in chapter 6 →

Chapter 7: Substituting dependencies in tests

7.1 Testing code that relies on the current time · 7.2 Testing code that uses Streams · 7.2.1 Memory stream · 7.2.2 File stream from copied files · 7.2.3 Manifest resource streams · 7.3 Finding easier ways to write large strings · 7.4 Replacing dependencies with fakes · 7.4.1 Considering an example repository design pattern · 7.4.2 Setting up the unit-test class · 7.4.3 Validating faked method calls · 7.4.4 Verifying the number and order of calls · 7.4.5 Throwing exceptions from fakes · 7.5 Summary

What you learn in chapter 7 →

Chapter 8: Integration testing

8.1 Applications with many dependencies · 8.2 Testing with an in-memory database · 8.3 Testing HTTP calls · 8.4 Broader integration tests · 8.5 Integration-testing ASP.NET Core APIs · 8.6 Summary

What you learn in chapter 8 →

Chapter 9: Security

9.1 Securing applications · 9.2 Threat modeling · 9.3 Setting up HTTPS · 9.4 Checking for SQL injection vulnerability · 9.4.1 Adding an interceptor · 9.4.2 Configuring the connection string safely · 9.5 ASP.NET Core Identity · 9.5.1 Setting up Microsoft authentication · 9.5.2 Authenticating with Swagger UI · 9.6 Authorization · 9.7 Summary

What you learn in chapter 9 →

Chapter 10: Performance and profiling

10.1 Why test performance? · 10.2 Introduction to BenchmarkDotNet · 10.3 Profiles · 10.3.1 Capturing profiles with BenchmarkDotNet · 10.3.2 Analyzing profiles · 10.3.3 Using PerfView · 10.3.4 Understanding garbage collection · 10.4 Web performance testing · 10.5 Summary

What you learn in chapter 10 →

Chapter 11: Handling failures

11.1 Operating in the real world · 11.2 EF Core · 11.2.1 Database transactions · 11.2.2 Retrying on transient faults · 11.3 Polly · 11.3.1 Simulating HTTP errors · 11.3.2 Other Polly capabilities · 11.4 Summary

What you learn in chapter 11 →

Chapter 12: Building world-ready applications

12.1 Creating the sample application · 12.2 Getting resource strings · 12.3 Adding resource languages · 12.4 ASP.NET Core’s built-in culture support · 12.5 Internationalization · 12.5.1 Globalization · 12.5.2 Localizability review · 12.5.3 Testing right-to-left languages · 12.5.4 Other considerations for globalization · 12.6 Summary

What you learn in chapter 12 →

Chapter 13: Working with containers

13.1 Why use containers? · 13.2 Container landscape · 13.3 Building a container image · 13.3.1 Using .NET 6 and earlier or custom Dockerfile · 13.3.2 Using .NET 7 and later · 13.4 Configuration · 13.4.1 Controlling the .NET environment · 13.4.2 Configuration order · 13.4.3 Hierarchical configuration · 13.4.4 Applying configuration in Docker Desktop · 13.4.5 Mapping configuration to objects · 13.5 Secrets · 13.6 Summary

What you learn in chapter 13 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.