StateSelectListItems(ILocalizationManager localizationManager)
    {
        var list = new List&lt;SelectListItem&gt;
        {
            new SelectListItem
            {
                Text = localizationManager.GetString(SimpleTaskAppConsts.LocalizationSourceName, &quot;AllTasks&quot;),
                Value = &quot;&quot;,
                Selected = SelectedTaskState == null
            }
        };

        list.AddRange(Enum.GetValues(typeof(TaskState))
                .Cast&lt;TaskState&gt;()
    