<commit_before>﻿@using MvcBootstrap.Web.Mvc.Views.Extensions
@model MvcBootstrap.ViewModels.IEntityViewModelCollection

@{
    string collectionPropertyName = (string)this.ViewData["CollectionPropertyName"];
}

@if (Model == null)
{
    @ViewData.ModelMetadata.NullDisplayText
}
else 
{
    <text>
        <select class="entity">
            @foreach (var option in Model.Choices)
            {
                <option value="@option.Id" @(Model.Contains(option) ? @"selected=selected" : "")>
                    @this.Bootstrap().ViewModelLabelFor(collectionPropertyName, m => option)
                </option>
            }
        </select><commit_msg>Related entity collection correctly displays as multiselect using Chosen<commit_after>﻿@using MvcBootstrap.Web.Mvc.Views.Extensions
@model MvcBootstrap.ViewModels.IEntityViewModelCollection

@{
    string collectionPropertyName = (string)this.ViewData["CollectionPropertyName"];
}

@if (Model == null)
{
    @ViewData.ModelMetadata.NullDisplayText
}
else 
{
    <text>
        <select class="entity" multiple="multiple">
            <option>
            </option>
            @foreach (var option in Model.Choices)
            {
                <option value="@option.Id" @(Model.Contains(option) ? @"selected=selected" : "")>
                    @this.Bootstrap().ViewModelLabelFor(collectionPropertyName, m => option)
                </option>
            }
        </select>
{'fraction_non_alphanumeric': 0.12430167597765363, 'fraction_numerical': 0.0, 'mean_word_length': 2.683804627249357, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3961930', 'n_tokens_mistral': 404, 'n_tokens_neox': 388, 'n_words': 68}