Learn Minimal APIs from start to finish. Perfect for beginners.

.NET tutorials

Add Stripe to your .NET project to accept online payments
Add Stripe to your .NET project to accept online payments

Add Stripe to your ASP.NET Core project to take online payments with this checkout example that uses the Stripe.net NuGet package.

C# try, catch and finally: When does each block run?
C# try, catch and finally: When does each block run?

Learn exactly when the try, catch and finally blocks execute in C#, including edge cases in console apps and ASP.NET Core when exceptions are thrown.

How to use C# async/await for API calls & to stop blocking
How to use C# async/await for API calls & to stop blocking

Learn how to make an async method in C# that does an await on an ASP.NET Core Web API request and returns a Task type.

How to use HttpClient correctly to avoid socket exceptions
How to use HttpClient correctly to avoid socket exceptions

Learn the best practices on how to use HttpClient correctly and avoid socket exceptions by using HttpClientFactory in an ASP.NET Core Web API.

How to use Moq for mocking objects with xUnit and .NET
How to use Moq for mocking objects with xUnit and .NET

Learn how to use Moq for mocking objects like classes and interfaces in an xUnit test project when writing unit tests for .NET and C# projects.

How to use xUnit to run unit testing in .NET and C#
How to use xUnit to run unit testing in .NET and C#

xUnit beginners tutorial on how to run unit testing in C# and .NET using the Fact and Theory attributes, as well as focusing on different Assert methods.

How to create ASP.NET Core Web API CRUD methods
How to create ASP.NET Core Web API CRUD methods

We create an ASP.NET Core Web API project and show CRUD examples using GET, POST, PUT & DELETE methods with routing as well as how to test in Postman.

How to create and add custom middleware in ASP.NET Core
How to create and add custom middleware in ASP.NET Core

Find out how to create custom middleware using C# and add it to a .NET app by adding HTTP response headers to an ASP.NET Core Web API request.

Exception handling has its own middleware in .NET 8
Exception handling has its own middleware in .NET 8

Exception handling in C# has improved dramatically with the launch of it's own IExceptionHandler middleware in .NET 8 .

Validating appsettings becomes much faster with .NET 8
Validating appsettings becomes much faster with .NET 8

.NET 8 allows for a faster way to validate the option values in appsettings.json in an ASP.NET Core Web API using data annotations.