explaingit

dodyg/practical-aspnetcore

10,373C#Audience · developerComplexity · 2/5Setup · easy

TLDR

A large collection of small, runnable C# code examples for ASP.NET Core, covering routing, authentication, caching, SignalR, and more across versions 2.1 through 10.

Mindmap

mindmap
  root((repo))
    What it is
      Code example collection
      Runnable mini projects
      Version 2.1 to 10
    Topics covered
      Routing and forms
      Authentication
      Real-time SignalR
      Database access
    How to use
      Clone the repo
      Open any folder
      Run dotnet run
    Audience
      C# developers
      ASP.NET learners
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Look up a specific ASP.NET Core feature like caching or JWT auth and run a minimal working example immediately.

USE CASE 2

Find a concrete SignalR demo for real-time notifications in your ASP.NET Core web app.

USE CASE 3

Compare how a specific behavior changed between ASP.NET Core versions by browsing examples across branches.

Tech stack

C#ASP.NET Core.NET

Getting it running

Difficulty · easy Time to first run · 5min

Requires the .NET SDK, each example is a self-contained project with no extra dependencies.

In plain English

This repository is a large collection of small, working code examples for ASP.NET Core, which is Microsoft's framework for building web applications and APIs using the C# programming language. Each example is a self-contained project that demonstrates one specific thing, such as how to handle user logins, how to send emails, how to cache pages for faster loading, or how to set up routing so that web addresses map to the right parts of your application. The collection covers many versions of ASP.NET Core, from version 2.1 up through version 10, and older versions are kept on separate branches so you can look up how things worked in a previous release. The README itself serves as the primary reference, listing every section and how many examples it contains. Sections range from basics like reading form submissions and query strings, to more advanced topics like building real-time features with SignalR, connecting to databases, and integrating workflow engines. The intended audience is developers who are already writing C# and want to see a concrete, runnable demonstration of a specific ASP.NET Core feature rather than reading through long documentation pages. Each project is meant to compile and run, so you can open it, run it, and immediately see the behavior described. The repository is maintained by a single author based in Cairo, Egypt, who also accepts sponsorship through GitHub Sponsors. The project is actively updated to track new ASP.NET Core releases, with dedicated sections for the latest features in version 9 and version 10. It also links out to related example repositories for other frameworks and libraries in the .NET ecosystem.

Copy-paste prompts

Prompt 1
Using the practical-aspnetcore style, give me the minimal C# project to add JWT authentication to an ASP.NET Core 9 API.
Prompt 2
Show me a self-contained ASP.NET Core SignalR example for pushing real-time notifications to a browser client.
Prompt 3
Give me the simplest ASP.NET Core 9 example of setting up response caching so repeated requests return instantly.
Open on GitHub → Explain another repo

← dodyg on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.