GitHub - dodyg/practical-aspnetcore at 2.1-LTS (original) (raw)

306 samples for ASP.NET Core 2.1, 2.2, 3.0, 3.1 and 5.0 preview 5 fundamentals

There is an active branch that converts all these samples to ASP.NET Core 3.1 and ASP.NET Core 5.

If you are studying ASP.NET Core, I am lurking on this Gitter Channel.

Hi Nuget visitors, if you have problem finding the sample you are looking for, please use the github search functionality or otherwise file a case. I will be happy to point you to the right direction.

Welcome

The goal of this project is to enable .NET programmers to learn the new ASP.NET Core stack from the ground up directly from code. There is so much power in the underlying ASP.NET Core stack. Don't miss them!

I highly recommend using Visual Studio Code to play around with these samples but it is not required. You can use Visual Studio 2019 as well.

Note: If you encounter problem with downloading packages or Nuget, try the following command nuget.exe locals -clear all.

ASP.NET Core API Browser is also very handy.

Additional Sections

Section No. of Samples .NET Core SDK Version
ASP.NET Core 3.0 57 3.0
Blazor Client Side (Web Assembly) 18 3.1
Blazor Server Side 7 3.0
ASP.NET Core MVC 47 2.1
ASP.NET Core Razor Pages 4 2.2
ASP.NET Core SignalR 1 2.1
Security related samples 1 2.2
Orchard Core Framework 4 3.0
What's new in ASP.NET Core 2.2 14 2.2
What's new in ASP.NET Core 2.1 6 2.1
What's new in ASP.NET Core 2.0 11 Features introduced in 2.0 but samples run on 2.1
Foundational ASP.NET Core 2.1 Samples 136 2.1

How to run these samples

To run these samples, simply open your command line console, go to each folder and execute dotnet watch run.

Most of the examples here uses Microsoft.AspNetCore package which is a package consisted of

  Microsoft.AspNetCore.Diagnostics
  Microsoft.AspNetCore.HostFiltering
  Microsoft.AspNetCore.Hosting
  Microsoft.AspNetCore.Routing
  Microsoft.AspNetCore.Server.IISIntegration
  Microsoft.AspNetCore.Server.Kestrel
  Microsoft.AspNetCore.Server.Kestrel.Https
  Microsoft.Extensions.Configuration.CommandLine
  Microsoft.Extensions.Configuration.EnvironmentVariables
  Microsoft.Extensions.Configuration.FileExtensions
  Microsoft.Extensions.Configuration.Json
  Microsoft.Extensions.Configuration.UserSecrets
  Microsoft.Extensions.Logging
  Microsoft.Extensions.Logging.Configuration
  Microsoft.Extensions.Logging.Console
  Microsoft.Extensions.Logging.Debug

When an example requires packages that are not listed here, it will be added to the project file.

Foundation ASP.NET Core 2.1 Samples

All these projects require the following dependencies

   "Microsoft.AspNetCore" : "2.1.0"

Generic Host (9)

Generic Host is an awesome way to host all sort of long running tasks and applications, e.g. messaging, background tasks, etc.

This section is dedicated to all the nitty gritty of Generic Host. All the examples in this section rely on Microsoft.AspNetCore.App package.

Misc