.NET tutorials

File logging in ASP.NET Core made easy with Serilog

File logging in ASP.NET Core made easy with Serilog

Learn how to add file logging to an ASP.NET Core app using Serilog, including setup, configuration, and writing logs to daily rolling files.
ASP.NET Core route constraints: A quick guide for developers

ASP.NET Core route constraints: A quick guide for developers

Learn ASP.NET Core route constraints in this quick guide for developers. Fix routing issues fast and improve API accuracy with simple, clear examples.
How to upload files in an ASP.NET Core Web API

How to upload files in an ASP.NET Core Web API

Learn how to upload files with IFormFile and IFormFileCollection using minimal APIs in ASP.NET Core, and how to generate antiforgery tokens.
Are C# 14's new features worth updating your app to .NET 10?

Are C# 14's new features worth updating your app to .NET 10?

Discover the new features in C# 14 - from extension members to the field keyword - and find out whether upgrading your app to .NET 10 is really worth it.
Read & write to a CSV file using a list in ASP.NET Core

Read & write to a CSV file using a list in ASP.NET Core

Learn how to read and write CSV files in ASP.NET Core using lists, including handling headers and mapping different header titles easily.
Add request logging to a database in an ASP.NET Core Web API

Add request logging to a database in an ASP.NET Core Web API

Learn how to add request logging to a database in an ASP.NET Core Web API using Entity Framework Core to effectively monitor and analyse API traffic.
xUnit v3 update: Ability to skip tests & a new TestContext

xUnit v3 update: Ability to skip tests & a new TestContext

Learn how to upgrade your xUnit project to v3 to use new features like skip assertions, TheoryDataRow, MatrixTheoryData, and a new TestContext.
Use fixtures in xUnit for shared context in unit tests

Use fixtures in xUnit for shared context in unit tests

Learn how to use xUnit fixtures like IClassFixture and ICollectionFixture to share setup and context across your unit tests efficiently.
xUnit advanced Assert methods: Throws, IsType + more

xUnit advanced Assert methods: Throws, IsType + more

Master advanced xUnit assert methods like Throws, Raises, and IsType to create precise, reliable, and easy-to-read unit tests.
xUnit Assert basics: True/False, Equal, Same, Matches and more

xUnit Assert basics: True/False, Equal, Same, Matches and more

Learn xUnit basic assert methods like boolean checks, range validations, and string assertions to write clear, reliable, and maintainable unit tests.