ASP.NET Core and Docker Lab

Goals

  • Build a Web API without any behind-the-scenes help from Visual Studio
  • Keep things simple
    • Rely on dotnet CLI tools - no build scripts
    • Understand what every file in your project is
    • Stick with the defaults until there's a reason not to
  • Use Postman to interact with your API

Bonus goal

  • Put your app in a Docker container and interact with it some more
  • Try a multi-stage Docker build

Prerequisites

Quick install with Chocolatey

If you don't have Chocolatey, install it first. I recommend the "Install with cmd.exe" instructions.

Once Chocolatey is installed, run the following commands.

choco install dotnetcore-sdk vscode postman docker-for-windows
refreshenv
code --install-extension ms-vscode.csharp --install-extension peterjausovec.vscode-docker

Required

Optional

Helpful links

Basic terms

  • .NET - Microsoft's set of standard libraries used to build software, widely used with C#.

  • .NET Framework - Microsoft's historical software framework. It provides a huge library of classes that you can use to easily build software. .NET Framework exists mostly as an all-in-one, all-or-nothing inclusion in your project - you can't pick and choose which components of it you want. It only natively supports Windows.

  • .NET Core - Microsoft's modern software framework. It provides many of the features of .NET Framework, but is designed to be open-source, cross-platform, and modular.

  • .NET Standard - A set of APIs that all implementations of .NET share.

  • ASP.NET Core - A framework that extends .NET Core with features to build web APIs and web apps.