About
Code examples
Videos
Courses
Contact
View courses
If you want to learn about Blazor WebAssembly and Dependency Injection in .NET, check out our online courses
Home
.NET code examples
C# code examples and snippets for .NET
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.
Roulette wheel in Blazor WebAssembly
Create Roulette using Blazor WebAssembly. This .NET Blazor Wasm demo is built up with C# and Razor components.
Integrate SignalR Inside a React App
An .NET 5 code example building a React app inside an ASP.NET Core application, with SignalR integration for sending messages.
Dependency Injection in ASP.NET Core
Download the source code for using dependency injection in ASP.NET Core, which uses the singleton, scoped and transient service lifetimes.
Read appsettings.json Config in ASP.NET Core
Download the source code and read the appsettings.json file in an ASP.NET Core MVC application. Bind using the options pattern.
Create a PDF using HTML & CSS in ASP.NET Core
Download the source code to allow you to create free PDF documents in ASP.NET Core. Capture a website layout and create an invoice.
Create Your Own File Logger
An ASP.NET Core for .NET 5 Web API which extends .NET Core's logging feature to log to text files in a HostedService.
Dynamic Queries using LINQ Expressions
Writing dynamic queries for Entity Framework. A sample .NET 5 MVC application, showing examples of LINQ expressions.
A FromBody and FromQuery sample in ASP.NET Core Web API
An ASP.NET Core example of using the FromBody and FromQuery attribute. Handy if your request is null, or getting a 415 error.
Page 3 of 3
1
2
3
Learn Blazor WebAssembly with our online courses
Part 1
Building your first Blazor WebAssembly app
Part 2
Blazor WebAssembly: Foundation Skills
Part 3
Advanced Blazor WebAssembly