When we bind configuration options from the appsettings.json file in an ASP.NET Core Web API, they can be validated using data annotations. Not only can they be validate on runtime, but they can also be validated before the application has even started.
This functionality has been around for a number of .NET versions, but with .NET 8 there is a new faster way of performing validation on configuration options.
In this video, we'll explore the previous way of implementating validation on config options and explain what the performance improvements are with .NET 8 and why you should use them.
📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-c...
👨💻Take our .NET and C# coding challenges👨💻
https://www.roundthecode.com/dotnet-c...
► More information:
https://www.roundthecode.com/dotnet-t...
🎥 Playlist 🎥
• .NET 8 and C# 12 new features
► Chapters
0:00 What we'll cover
0:12 Validate configuration options before .NET 8
2:16 Why validating options can be slower
2:35 Validate configuration options with .NET 8
5:16 How to read an appsettings.json value
#configuration #dotnet #validation
Смотрите видео Appsettings in .NET 8 are much faster to validate онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Round The Code 19 Декабрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,980 раз и оно понравилось 52 людям.