Views
Import feature flag helpers globally
In your _ViewImports.cshtml
add the following line
Anywhere in your views you can now surround the parts of the page that make up the feature
or add display the contents conditionally if Any
or All
the referenced features are enabled
It's good practice to create a static class or strings or an enum for your features collection to avoid typos. Feature flags in C# work with both strings and enums
Last updated