filmov
tv
.NET 6: New features in .NET 6 (includes Minimal APIs)

Показать описание
.NET 6 is here, and we try out four new features (like Minimal APIs) that you can use with your C# application.
We use an ASP.NET Core 6 Web API using Visual Studio 2022, and these features are amongst a number of updates that have been applied to the latest version of .NET.
The new features we cover are:
● Console template
The console template is one of the biggest .NET 6 changes. The ability to remove the namespace, class and Main method removes a lot of boiler-plate code making it easier to read.
● Merge Program and Startup
Continuing with the theme of making code easier to read, we look at how we can move the Startup class and put the configuration into the Program class.
● Minimal APIs
Minimal APIs are great if you have a very small API. We show you how you can bypass the MVC route, and put your API routes in the Program class.
● DateOnly and TimeOnly
At long last, .NET 6 allows you to use the DateOnly struct if you just want a date, and the TimeOnly struct if you just want the time.
💻 Download the code example for this demo 💻
📖 Learn .NET and C# with our online courses 📖
► Chapters
0:00 .NET 6 is close to completion
0:44 Console template
2:31 Merge Program and Startup
5:39 Minimal APIs
10:38 DateOnly and TimeOnly
14:16 How to use .NET 6
#dotnet #dotnet6 #aspnetcore
We use an ASP.NET Core 6 Web API using Visual Studio 2022, and these features are amongst a number of updates that have been applied to the latest version of .NET.
The new features we cover are:
● Console template
The console template is one of the biggest .NET 6 changes. The ability to remove the namespace, class and Main method removes a lot of boiler-plate code making it easier to read.
● Merge Program and Startup
Continuing with the theme of making code easier to read, we look at how we can move the Startup class and put the configuration into the Program class.
● Minimal APIs
Minimal APIs are great if you have a very small API. We show you how you can bypass the MVC route, and put your API routes in the Program class.
● DateOnly and TimeOnly
At long last, .NET 6 allows you to use the DateOnly struct if you just want a date, and the TimeOnly struct if you just want the time.
💻 Download the code example for this demo 💻
📖 Learn .NET and C# with our online courses 📖
► Chapters
0:00 .NET 6 is close to completion
0:44 Console template
2:31 Merge Program and Startup
5:39 Minimal APIs
10:38 DateOnly and TimeOnly
14:16 How to use .NET 6
#dotnet #dotnet6 #aspnetcore
Комментарии