.NET
C#
ASP.NET Core
Tutorials
Code examples
Courses
Coding challenges
Blog
Contact
Home
.NET code examples
.NET code examples
Data annotation .NET 8 additions in an Web API example
An ASP.NET Core Web API code example which includes the new data annotations for .NET 8 such as AllowedValues and Length.
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
Download the code example for injecting keyed services with dependency injection with an ASP.NET Core web app.
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
Download a ASP.NET Core JWT authentication example allowing you to generate a Bearer token to authenticate a HTTP request.
Roulette wheel in Blazor WebAssembly
Create Roulette using Blazor WebAssembly. This .NET Blazor Wasm demo is built up with C# and Razor components.
Connect 4 game in Blazor WebAssembly
Create Connect 4 using Blazor WebAssembly. This .NET Blazor Wasm demo is built up with C# and Razor components.
Tic-Tac-Toe game in Blazor WebAssembly
Create Tic-Tac-Toe (Noughts & Crosses) using Blazor WebAssembly. This Blazor Wasm demo is built up with C# and Razor components.
Azure DevOps pipeline example .NET project for CI/CD
A .NET project for use in the CI/CD setup of a Azure DevOps pipeline. This demo can be used for a build and release pipeline.
FromQuery and other ASP.NET Core Web API attributes
An ASP.NET Core code sample that features examples of FromQuery, FromHeader, FromForm, FromRoute, FromServices and FromBody in a Web API.
1
2
3
4
Watch .NET tutorials
Subscribe to our YouTube channel