.NET 8 and C# 12 tutorials

How to download and install the .NET 8 and C# 12 release

How to download and install the .NET 8 and C# 12 release

.NET 8 and C# 12 have been released and we'll show you how to update Visual Studio and download the .NET 8 SDK.
Data annotations has some awesome additions in .NET 8

Data annotations has some awesome additions in .NET 8

Model validation for ASP.NET Core Web API now includes data annotations such as allowed and denied values as well as Base64 string validation.
Primary constructors has caused concerns for C# developers

Primary constructors has caused concerns for C# developers

Primary constructors, the new C# 12 feature, have caused some concerns for developers when using it with dependency injection.
TimeProvider makes it easier to mock time in .NET 8

TimeProvider makes it easier to mock time in .NET 8

The TimeProvider abstract class can be used in xUnit unit tests to mock the time and a timer using the FakeTimeProvider in .NET 8.

.NET 8 and C# 12 videos

How to update to .NET 8: The fastest .NET to date

.NET 8 and C# 12 has launched and we'll show you how to update Visual Studio to 17.8 so you can start using .NET 8 in your projects today!

Awesome data annotations that are new in .NET 8

Explore some of the new data annotations that are available in .NET 8 to improve model validation in an ASP.NET Core Web API

Primary constructors causing concern for C# developers

Find out why developers are concerned about using the new primary constructors feature in C# 12 and whether you should use them.

Mocking time just became much easier in .NET

.NET 8 introduces the TimeProvider class which provides abstractions for mocking time in xUnit tests with the FakeTimeProvider class.

Download .NET code examples

TimeProvider example for mocking time and timer in xUnit

TimeProvider example for mocking time and timer in xUnit

A .NET 8 xUnit project which uses the TimeProvider and FakeTimeProvider class to mock time and a timer in unit tests.
Keyed services for ASP.NET Core dependency injection example

Keyed services for ASP.NET Core dependency injection example

Download the code example for injecting keyed services with dependency injection with an ASP.NET Core web app.
Basic authentication in ASP.NET Core

Basic authentication in ASP.NET Core

Purchase a ASP.NET Core Basic authentication example allowing you to add the Authorization header to a HTTP request.
JWT authentication in ASP.NET Core

JWT authentication in ASP.NET Core

Download a ASP.NET Core JWT authentication example allowing you to generate a Bearer token to authenticate a HTTP request.

.NET coding challenges

Guess the SOLID principle from C# code

Guess the SOLID principle from C# code

Take our C# coding challenge where you have to guess the SOLID principle we are following from the code snippet.
Add services to dependency injection in .NET

Add services to dependency injection in .NET

Take on our .NET coding challenge to add dependency injection services and lifetimes to an ASP.NET Core app.
Add model binding in an ASP.NET Core Web API

Add model binding in an ASP.NET Core Web API

ASP.NET Core Web API model binding coding challenge to add the [FromHeader] attribute in an action.
ASP.NET Core dependency injection service lifetimes

ASP.NET Core dependency injection service lifetimes

Learn about ASP.NET Core dependency injection and their service lifetimes with our C# coding challenge.

Learn .NET with our online courses

ASP.NET Core in .NET 6: Dependency Injection

ASP.NET Core in .NET 6: Dependency Injection

Looking at dependency injection with C# examples for beginners. The course looks at what dependency injection is, the different service lifetimes, and some of the common errors.
Blazor WebAssembly: Building your first app

Blazor WebAssembly: Building your first app

Looking at how Blazor WebAssembly works and some of its benefits. Looking how it compares to Blazor Server and how Razor components work.
Blazor WebAssembly: Foundation skills

Blazor WebAssembly: Foundation skills

Focusing how to use configuration, authentication, API integration with HttpClient, logging, deployment in a Blazor WebAssembly app.
Advanced Blazor WebAssembly

Advanced Blazor WebAssembly

Advanced Blazor WebAssembly features, such as JavaScript interlop, SignalR, file uploads, state management and prerendering.