       case TaskState.Open:
                return &quot;label-success&quot;;
            default:
                return &quot;label-default&quot;;
        }
    }
}</pre>

<p>This simple view model gets a list of tasks (which is provided from ITaskAppService) in it&#39;s constructor. It also has GetTaskLabel method that will be used in the view to select a Bootstrap label class for given task.</p>

<h4 id="ArticleTaskListPage">Task List Page</h4>

<p>And finally, the Index view is shown below:</p>

<pre l