Building an Async API with ASP.NET Core 3
Coding an asynchronous API comes with its own set of challenges. In this course you'll learn what they are and how you can benefit from writing async code. You'll learn how to do that starting at the bottom layer and working right up to the top.
What you'll learn
Coding an asynchronous API comes with its own set of challenges. In this course, Building an Async API with ASP.NET Core, you will gain the ability to increase the scalability and performance of your API by writing async code. First, you will learn how asynchronous code actually works and what the advantages can be. Next, you will discover how to consume an EF Core data store asynchronously, how to expose that data via an API, and how to call into a service asynchronously. Finally, you will explore how to avoid common pitfalls when writing async code. When you’re finished with this course, you will have the skills and knowledge of asynchronous code needed to build a fully async API with ASP.NET Core.
Table of contents
- Version Check 0m
- Coming Up 1m
- Course Prerequisites 1m
- Frameworks and Tooling 1m
- Introducing the Demo Project 1m
- The Advantage of Asynchronous Code 3m
- Handling Synchronous Requests 2m
- Handling Asynchronous Requests 1m
- I/O Bound Versus Computational Bound Work 3m
- Threads, Multithreading, Concurrency, Parallelism 2m
- Summary 1m
- Coming Up 0m
- Demo: Getting Resources 5m
- Introducing WebSurge 1m
- Demo: Using WebSurge to Test Async Code Improvements 8m
- The Outer Facing Model 4m
- Manipulating Output with an AsyncResultFilter 4m
- Demo: Creating a Custom AsyncResultFilter (Part 1) 4m
- Adding and Configuring AutoMapper 4m
- Demo: Creating a Custom AsyncResultFilter (Part 2) 5m
- Summary 1m
- Coming Up 1m
- Demo: Asynchronously Integrating with an External Service 9m
- Demo: Handling Multiple Service Calls One by One 2m
- Demo: Passing Multiple Objects to an AsyncResultFilter with ValueTuple 5m
- Demo: Mapping Multiple Objects into One 6m
- Demo: Handling Multiple Service Calls in Parallel 5m
- Why Cancellation Matters 1m
- Demo: Cancelling Tasks 5m
- Demo: Handling Exceptions 4m
- Summary 1m
- Coming Up 1m
- Offloading Legacy Code to a Background Thread 1m
- Demo: Wrapping Synchronous Code with Task.Run() 4m
- Pitfall #1: Using Task.Run() on the Server 2m
- Demo: Blocking Async Code 2m
- Pitfall #2: Blocking Async Code 2m
- Demo: Modifying Shared State 2m
- Pitfall #3: Modifying Shared State 1m
- Summary 1m