.NET 5 introduction
.NET 5 is the main implementation of .NET going forward.
- What and Why
- Understanding .NET 5: .NET Framework versus .NET 5
- Supporting multiple runtimes
- What is .NET Standard?
Visual Studio for ASP.NET Core
With .NET 5 Microsoft introduced a new project model, with a lot of emphasis on NuGet packages.
This new model can be used with any development environment, such as Visual Studio Code.
- Understanding the new project structure
- Browser auto-refresh while developing
- Installing dependencies with NuGet
- Targeting frameworks and handling differences
- Executing commands and tools with the dotnet CLI
- Pinning the SDK with global.json
- Handling bundling and minification in .NET 5 projects
.NET 5 Cross-Platform Capabilities
So how can I build .NET 5 applications on a Mac or Linux machine?
- Developing ASP.NET Core on any platform
- Generating a .NET 5 project using dotnet CLI
- Getting started with Visual Studio Code
- LAB: Building a simple site with dotnet cli and Visual Studio Code
ASP.NET Core Pipeline
ASP.NET Core easily outperforms all other web hosting solutions. So how did they do that?
Here we will look at the ASP.NET Core pipeline, and how to make it do your bidding.
- Understanding the principle of the ASP.NET Core Pipeline
- Selecting your middleware in the
- Understanding the need for dependency injection and how to configure your dependencies
- Adding your first middleware for serving static files
- ASP.NET Core has its own routing middleware
- Showing proper diagnostics while developing, and how to configure it in production
- Review of built-in middleware
- LAB:Configuring the ASP.NET Core Pipeline
ASP.NET Core Configuration
ASP.NET Core allows you to pick and choose where to store your configuration.
No more deploying web.config with production settings in source control!
We will look at the idea behind this and of course how to choose your ideal configuration.
- No more web.config
- Formats: JSON, INI, XML, and others..
- Different ways of getting configuration to your code
- Storing sensitive configuration in Secrets
- Why you should store confidential configuration in environment variables and user secrets
- Using the Options pattern
- Adding your own configuration provider
- LAB: Using the new configuration system
Proper logging is essential to find problems while developing and in production.
.NET 5 brings a unified logging approach which you can use anywhere in .NET
and also works with your preferred logging framework such as NLog.
- Why do we need another logging framework?
- Choosing from different logging providers
- Understanding logging scopes
- An example: Using NLog
- Logging guidelines and recommendations
Building Custom Middleware for ASP.NET Core
The Open Web Interface for .NET brought a simple standard way for building web servers with .NET.
ASP.NET Core built upon this standard and with it you can easily build your own custom extensions.
- What is the OWIN specification?
- Building your own custom middleware
- Testing your middleware
- LAB: Building a custom middleware class and testing it
On the web the URL decides what the server will do. In ASP.NET Core you will find the End-point Routing Middleware.
A solid understanding of this middleware is required to build applications with ASP.NET Core.
- Getting Started with Routing Concepts
- Defining Routing Templates
- Route Parameter Contraints
- Route Parameter Transformers
- Understanding Route Matching
- Using Conventional vs. Attribute Routing
- Routing Attributes
- Handling Routing Errors
- LAB: Routing and custom routing contraints
ASP.NET Core Model-View-Controller
Every new version of MVC brings a couple of improvements making it easier for developers to
build state-of-the-art web applications.
Among other features we will look at taghelpers, which bring a similar concept like
Angular directives to the server side.
- Web UI and Web API Unification
- Understanding _ViewStart.cshtml and _ViewImports.cshtml
- Better readable and more powerfull Razor with tag helpers
- Developing and installing your own tag helpers
- What are View Components, and how can I build and use them
- Service Injection with views
- LAB: What is new in ASP.NET Core MVC
Publishing Your Application
So you have finished a working version of your application. How do you deploy this? What are the options?
Since .NET is cross-platform, you can build everything on Windows, and then run on Linux. You could even deploy your application to a Docker container!
We will also discuss various deployment options, such as assembly trimming.
- Deployment Options
- Cross-platform Deployment
- Self-Contained Deployment
- Optimize your deployment with Assembly Trimming
- Deploying to Containers
Entity Framework Core
With .NET 5 also comes a while new Entity Framework Core.
A new implementation of EF, which can run cross-platform, on Windows, Mac and Linux.
- Differences with .NET 4.x Entity Framework
- Scaffolding your project from an existing database
- Understanding the generated code
- Interacting with the database with LINQ
- LAB: Scaffolding your model from an existing database
Modeling your database with EF Core
Mapping in EF Core uses conventions, attributes, or Fluent API.
You will see how to use these to model your database in EF Core and apply the changes
with Code-first Migrations.
- Methods of configuration
- Creating and applying migrations
- Table and column mapping
- Modeling properties
- Mapping Value generated properties
- Handling Concurrent updates
- Modeling relationships
- Mapping inheritance
- LAB: Modelling a database with EF Core
Add real-time web functionality to your application.
- What is SignalR?
- Server Concepts
- LAB: Building an emergency dashboard with SignalR
Building Singe Page Applications with C# and Blazor
Building Single-Page Applications (SPA) is a very popular way of building applications on the web.
Angular, VueJs, React and others can be used to build these, but they all require you to learn
But not any longer! Now you can use C# (and Visual Studio) and apply all those skills learned over the years
to build SPAs with Blazor.
Blazor makes building interactive client-side web applications efficient and fun that work on any modern browser.
- Introducing Blazor and Web Assembly
- Client-Side vs. Server-Side Blazor
- Creating a simple Blazor Component
- Hosting Blazor
- LAB: Building a simple Blazor application