☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code: / milanjovanovic
The Options pattern allows us to use classes to provide strongly typed configuration values in our application at runtime. But you have no guarantee that the configuration values injected with IOptions will be correctly read from the application settings. In this video, I will show you how to introduce validation to your IOptions and ensure the application settings are correct. You will also see how to verify that the options are correctly configured at the application start.
Adding Validation To The Options Pattern In ASP.NET Core
https://www.milanjovanovic.tech/blog/...
How To Use The Options Pattern In ASP.NET Core 7:
https://www.milanjovanovic.tech/blog/...
Join my weekly .NET newsletter:
https://www.milanjovanovic.tech
Read my Blog here:
https://www.milanjovanovic.tech/blog
Subscribe for more:
/ @milanjovanovictech
Chapters
0:00 Configuring the Options pattern
1:40 Checking the setting's value
2:27 What could go wrong?
3:05 Adding validation with Data Annotations
3:35 Configuring the Options pattern for validation
5:20 Validating options at application start
6:42 Adding custom validation rules
Смотрите видео The Best Way To Validate Your Options In .NET Core онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Milan Jovanović 01 Январь 1970. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 11,924 раз и оно понравилось 584 посетителям.