C
C#2y ago
devhl

❔ Get required value from IConfiguration

There is a GetRequiredSection extenion in Microsoft.Extensions.Configuration, but is there a GetRequired to return a non nullable value? Also, why is the second variable here null but the first is not?
4 Replies
devhl
devhlOP2y ago
I'm reading on SO GetValue just doesn't work on complex types. So now just trying to see if there is anything for Get but not returning nullable.
phaseshift
phaseshift2y ago
Oh gosh. Just bind them to a class and or use IOptions
jcotton42
jcotton422y ago
^
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server