Ever tried to use the ternary operator (predicate ? if_true : if_false) in .NET core Razor Pages and gotten unexpected result?
This won't work:
<span>@Model.SomeBoolProp ? "Yes" : "No"</span>
It's an easy fix - just encapsulate the whole statement in parenthesis and it will work as expected:
<span>@(Model.SomeBoolProp ? "Yes" : "No")</span>