.NET tutorials

How to inject services in ASP.NET Core dependency injection

How to inject services in ASP.NET Core dependency injection

We'll show you how to use dependency injection to inject services into controllers, minimal APIs, Razor views and middleware in an ASP.NET Core application.
How to use lifetimes in ASP.NET Core dependency injection?

How to use lifetimes in ASP.NET Core dependency injection?

We find out how the singleton, scoped and transient service lifetimes work in dependency injection and the differences between each one.
Use EF Core to easily save dates as UTC & show in local time

Use EF Core to easily save dates as UTC & show in local time

Learn how to create a ValueConverter in Entity Framework Core to save dates as UTC in the database & convert them back to your local time zone in ASP.NET Core.
How do you write a Dockerfile for an ASP.NET Core app?

How do you write a Dockerfile for an ASP.NET Core app?

Learn how to Dockerize an ASP.NET Core Web API by writing a Dockerfile to restore, build and publish your .NET application to a Docker container.
Static asset file sizes can be reduced by over 80% in .NET 9

Static asset file sizes can be reduced by over 80% in .NET 9

Static asset delivery optimisation in .NET 9 uses Brotli and Gzip compression for static asset files which can reduce the file size by over 80%.
What's new in .NET 9? Key features you need to know!

What's new in .NET 9? Key features you need to know!

Discover the latest updates in .NET 9. Explore new features, enhancements, and tools that you can use in your ASP.NET Core application right now!
C# 13 - New features and how you can use them now!

C# 13 - New features and how you can use them now!

C# 13 has been launched as part of the .NET 9 release and we'll take a look at the new features and how you can start using them today.
What are partial classes in C# and why do we use them?

What are partial classes in C# and why do we use them?

Find out what partial classes are in C#, examples of how to use them, the rules that we need to follow and why we use them.
Use ASP.NET Core feature management to toggle flags on & off

Use ASP.NET Core feature management to toggle flags on & off

ASP.NET Core's feature management allows you to toggle feature flags on and off by specifying them in appsettings and writing filters.
Add a SignalR hub to ASP.NET Core & connect using JavaScript

Add a SignalR hub to ASP.NET Core & connect using JavaScript

Learn how to add a SignalR hub to an ASP.NET Core app and how to connect to it by using a WebSocket through JavaScript.