IFeatureManagerSnapshot
private readonly IFeatureManagerSnapshot _featureManager;
public UsersController(IFeatureManagerSnapshot featureManager)
{
_featureManager = featureManager;
}
[Route("")]
public async Task<IActionResult> Index()
{
var feature1Enabled = await _featureManager.IsEnabledAsync(FeatureFlags.Feature1);
return View(feature1Enabled ? "Feature1Index" : "Index");
}Last updated