
Discover November 2021 updates to C#, .NET, and Visual Studio, and explore the release of C# minimal API with .NET 6.
Plan and migrate an existing dotnet five API to a dotnet six minimal API, download to a local solution, and compare the 2.5 and 2.6 minimal API results.
My GitHub account page which is used in previous video and used for cloning old standard controllers .NET 5 API project
Port the standard cars logic to a minimal api, define a car model as a record, implement a get cars endpoint, and verify with swagger returning two sample cars.
Demonstrates completing the remaining CRUD endpoints in a .NET 6 minimal API using Visual Studio 2022, including get by id, create, update, delete, and swagger testing for cars.
Demonstrates organizing a C# minimal API with regions to structure code and hide sections. Applies regions for cars, motorbikes, defaults, and models to improve navigation, then commits and pushes changes.
Demonstrates building a project board by creating cards, adding a model table, and placing items into the in-progress column, with steps to print results.
Add a car race model to the minimal API in Visual Studio, configure persistence in the race db context, and run migrations to update the database.
Open the package manager console, run commands to create a code-first migration for adding currencies, and review the generated migration and resulting tables like cars and motorbikes.
Demonstrate an implementation test of a minimal api by retrieving all items and by id, updating fields, and handling not found cases. Defer delete testing for future testing.
Implement a put endpoint to add a car to a race in the Minimal API, validating race and car IDs, updating the race's car list, and saving changes.
Implement a motor bike race model table and points, mirroring the cars example, using guidance from previous videos and repository code.
November 2021 represents significant date for every developer interested in C# and its related tools and technologies.
On November 2021 Microsoft lunched new C# version, version 10, new .NET CORE version, Version 6, new Visual Studio, version 2022, and many more.
One of the greatest changes is lunch of minimal API's! A new minimal way of writing C# API's.
This changes everything, from the way of thinking about C# API to its new minimal look and feel.
Lets together get skilled in all of the C# new technologies in a projects in which we will create new .NET 6 minimal API from zero to the end.
We will start with an preexisting regular REST .NET 5 C# web API which we will use for features guidance's and beside it create new .NET 6 minimal API project which we will compare to the old ways of writing API's.
I'm Luke, Senior Full Stack Software Engineer and lets together get skills and knowledge for building C# newest minimal API's.
C#
C# 10 adds the following features and enhancements to the C# language:
Record structs
Improvements of structure types
Interpolated string handlers
global using directives
File-scoped namespace declaration
Extended property patterns
Improvements on lambda expressions
Allow const interpolated strings
Record types can seal ToString()
Improved definite assignment
Allow both assignment and declaration in the same deconstruction
Allow AsyncMethodBuilder attribute on methods
CallerArgumentExpression attribute
Enhanced #line pragma
.NET 6
.NET 6 delivers the final parts of the .NET unification plan that started with .NET 5. .NET 6 unifies the SDK, base libraries, and runtime across mobile, desktop, IoT, and cloud apps. In addition to this unification, the .NET 6 ecosystem offers:
Simplified development: Getting started is easy. New language features in C# 10 reduce the amount of code you need to write. And investments in the web stack and minimal APIs make it easy to quickly write smaller, faster microservices.
Better performance: .NET 6 is the fastest full stack web framework, which lowers compute costs if you're running in the cloud.
Ultimate productivity: .NET 6 and Visual Studio 2022 provide hot reload, new git tooling, intelligent code editing, robust diagnostics and testing tools, and better team collaboration.
.NET 6 will be supported for three years as a long-term support (LTS) release.
Preview features are disabled by default. They are also not supported for use in production and may be removed in a future version. The new RequiresPreviewFeaturesAttribute is used to annotate preview APIs, and a corresponding analyzer alerts you if you're using these preview APIs.
.NET 6 is supported by Visual Studio 2022 and Visual Studio 2022 for Mac (and later versions).
Visual studio 2022
With Visual Studio 2022, you'll always get the best-in-class tools and services available for any developer, any app, and any platform. Whether you're using Visual Studio for the first time or you've been using it for years, there's a lot to like in our newest version!